2

We have completed an end-to-end E-Commerce platform using laravel 5.2.x. The project was started in January 2016 and we are in the final stages.

Have used Route::controller() method on almost 100+ routes. Changing all these into explicit rules at this stage is really painful task. At the same time we would like to upgrade laravel to 5.3 and use its benefits such as broadcasting.

I just want the controller method back. Is it something that we can extend the router class to 5.2.x's controller method?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574

1 Answers1

0

Yes, removal of Route::controller in Laravel 5.3 was a big step back, and was a result of misunderstanding of this advanced feature.

To fix this shortcoming, and without increasing needlessly complexity, I created a class called AdvancedRoute, which registers the controller routes. It can be used by simply replacing Route::controller with AdvancedRoute::controller

Full information how to install and use find at the GitHub repo at:

https://github.com/lesichkovm/laravel-advanced-route

Milan
  • 558
  • 6
  • 13
  • @M.Elwan what you pointed here was not the real reason. In any case, whatever the reason behind, it was not good enough to break thousands of code bases, that used this superb feature. – Milan Jun 22 '17 at 05:04