mercredi 31 janvier 2018

Laravel automatize routes

I am using some routes in my laravel App like this:

Route::get('/structure', 'Superuser\StructureController@index'); 

So if I go to localhost/myproject/structure I am using StructureController and it's method "index". Now I would like to use another features, like add, update, delete, reorder etc... Is there any simple way, that I needn't to write:

Route::get('/structure/add', 'Superuser\StructureController@add');
Route::get('/structure/update/{url}', 'Superuser\StructureController@update');
Route::get('/structure/delete/{url}', 'Superuser\StructureController@delete');

If is this possible, I would like to use ::get for everything. Thank you a lot.



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

Aucun commentaire:

Enregistrer un commentaire