Skip to content

Return Laravel Route::controller back to the framework for Laravel 5.5 and above

Notifications You must be signed in to change notification settings

marwan2/LaravelRouteControllerBackToLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

LaravelRouteControllerBackToLife

Return Laravel Route::controller back to the framework for Laravel 5.5 and above

Simply replace The Laravel main Router class 'vendor/laravel/framework/src/Illuminate/Routing/Router.php' with the Router.php in this repo. Also copy the ControllerInspector.php beside it.

And enjoy using Route::controller that you love, and your old projects use it too much.

Please note that any update from Laravel itself, may overwrite this file, so you may need to add only the following methods from this Class to Router.php class

  • public function controller($uri, $controller, $names = [])
  • protected function prependGroupUses($uses)
  • protected function registerInspected($route, $controller, $method, &$names)
  • protected function addFallthroughRoute($controller, $uri)

About

Return Laravel Route::controller back to the framework for Laravel 5.5 and above

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages