Answers for "Laravel Middleware route group"

PHP
1

Laravel Middleware route group

Route::middleware(['first', 'second'])->group(function () {
    Route::get('/', function () {
        // Uses first & second middleware...
    });

    Route::get('/user/profile', function () {
        // Uses first & second middleware...
    });
});
Posted by: Guest on January-05-2021
0

laravel route group middleware prefix

Route::group(['prefix' => 'admin','middleware' => ['auth:admin']], function() {
    Route::get('dashboard','AdminController@dashboard');
});
Posted by: Guest on September-28-2021
0

laravel route group middleware prefix

Route::group(['prefix' => 'post', 'middleware' => ['auth']], function(){
        Route::get('all','Controller@post');
        Route::get('user','Controller@post');
    })
Posted by: Guest on July-18-2021

Code answers related to "Laravel Middleware route group"

Browse Popular Code Answers by Language