Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel grouping routes

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

    Route::get('/user/profile', function () {
        // Uses first & second middleware...
    });
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #grouping #routes
ADD COMMENT
Topic
Name
8+3 =