Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel middleware route

Route::middleware([CheckAge::class])->group(function () {
    Route::get('/', function () {
        //
    });

    Route::get('admin/profile', function () {
        //
    })->withoutMiddleware([CheckAge::class]);
});
 
PREVIOUS NEXT
Tagged: #laravel #middleware #route
ADD COMMENT
Topic
Name
5+6 =