lundi 30 novembre 2015

Laravel 5 Route group controllers

Now I am writing routes like this:

Route::group(['prefix' => 'v2/'], function(){
    Route::post('/reg', 'UserController@reg');
    Route::post('/login', 'UserController@login');
    ...
});

Is there any way to make routes like this :

Route::group(['prefix' => 'v2/'], function(){
    Route::group(['uses' => 'UserController'], function(){
        Route::post('/reg', '@reg');
        Route::post('/login','@login');
        ...
    });
});



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire