1Route::middleware(['first', 'second'])->group(function () {
2 Route::get('/', function () {
3 // Uses first & second middleware...
4 });
5
6 Route::get('/user/profile', function () {
7 // Uses first & second middleware...
8 });
9});
1Route::group(['prefix' => 'post', 'middleware' => ['auth']], function(){
2 Route::get('all','Controller@post');
3 Route::get('user','Controller@post');
4 })
5
1Route::group(['prefix' => 'admin','middleware' => ['auth:admin']], function() {
2 Route::get('dashboard','AdminController@dashboard');
3});
4