An advanced route for Laravel 5.3 to support controllers
In Laravel 5.3 the advanced functionality Route::controller was removed. This class fixes this shortcoming.
Add the following to your composer file:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/lesichkovm/laravel-advanced-route.git"
}
],
"require": {
"lesichkovm/laravel-advanced-route": "dev-master"
},
Add the following line to where you want your controller to be mapped:
AdvancedRoute::controller('/{YOUR PATH}', '{YOUR CONTROLLER FULL NAME}');
Full Example:
Route::group(['prefix' => '/', 'middleware' => []], function () {
AdvancedRoute::controller('/auth', 'AuthController');
AdvancedRoute::controller('/cms', 'CmsController');
AdvancedRoute::controller('/shop', 'ShopController');
Route::any('/', 'WebsiteController@anyIndex');
});