jeudi 3 septembre 2015

Controllers naming convention in Laravel 5

All controllers in Laravel 5 are still named with Controller suffix, like AuthController and PasswordController. Is there any reason to follow this convention with own controllers, or are those suffixes just leftovers from pre-namespacing era?

I use action-based URL generation most of the time, so I avoid linking like url('home'), but prefer something like action('HomeController@index) instead. This way I can change URL patterns without a headache.

But action('Home@index') is so much more elegant. Any traps behind it?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JPEhOR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire