Routing
Routes to your Web App
Register a route
In root directory go to routes folder and you will find two files web.php file and api.php, those are the files to register urls routes, in web.php you will find next code:
routes will go in every key of the array, and in the value of every element will be place the name of the controller and the current method separated by '@' like this:
'yourRoute'=>'YourController@currentMethod'
The name of the methods and controllers are based on conventions, because PHP Booster promote and works fine with conventions, but in controllers it does not affect in functunallity
$routes is the default root array to register url, but you could add more routes in other arrays after $routes like this:
With addRoutes() helper you could add as many route arrays as you want and it is helpful to organize routes by controllers or features or any order that you want.
Last updated
Was this helpful?