What about to read the documetnation.
https://laravel.com/docs/9.x/middleware#excluding-middleware
Be part of JetBrains PHPverse 2026 on June 9 β a free online event bringing PHP devs worldwide together.
Not sure if it's possible.
But let's say I have a big group of routes that all uses some middleware with specific value:
Route::middleware(['permission:permission_x'])->group(function () {
// many routes
}
But some routes inside are also allowed another permission:
Route::middleware(['permission:permission_x'])->group(function () {
// many routes
Route::middleware(['permission:permission_y'])->group(function () {
// some specific route
});
});
Is it possible to do it somehow? Or not because it first goes through the first Middleware, then blocks whoever is not in the parent permission? Because if not it means I have to divide it to many other groups
Please or to participate in this conversation.