samedi 27 février 2016

larave 5.1 routes groups takes only the first controller?

Route::group(['prefix' => 'api'], function () {

    Route::controller(null, 'BoxController');
    Route::controller(null, 'CostController');

});

This is a routed group in Laravel 5.1 the urls for the first controller is working but not for the second one 'CostController'.

If I switch the lines the first one works only. I want both controllers url to be prefixed with ...api/box/ and ...api/cost/

Examples on the internet has only one controller in the group, maybe there is another syntax?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire