samedi 1 décembre 2018

Intelligent routing with controller

There is a way automatically set routes using my controller's methods?

Example: I have a PagesController with 'home' or 'index', 'about' and 'contact' methods. Can I set routes for every method without explictly typing them?

Something like

Route::?('PagesController');

or

Route::get('/{page}', 'PagesController@{page}');

?

yeah, i'm new in laravel...



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Pb9LJh
via IFTTT

Aucun commentaire:

Enregistrer un commentaire