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...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire