what to do after you install express to create an api code example
Example 1: How do I make a redirect in PHP?
header("Location: http://example.com/redirect_page.php");
die(); //Force the script to quit, or you would raise an error...
Example 2: How to use my constants in Larvel
Create a file constants.php inside app/config/ and put your settings in an array:
<?php
//file : app/config/constants.php
return [
'ADMIN_NAME' => 'administrator'
];
Then anywhere in your controllers or views you can get the value by using Config Facade:
echo Config::get('constants.ADMIN_NAME');