I'm using "laravel/lumen-framework": "5.7.*"
I have two middlewares, first one AuthTokenAuthenticate
that should be applied to all the routes, so its defined in bootstrap/app.php
like
$app->middleware([
App\Http\Middleware\AuthTokenAuthenticate::class
]);
Another middleware is defined like
$app->routeMiddleware([
'auth.token' => Vendor\Utilities\Middleware\AuthToken::class
]);
and will only be applied to some specific routes.
I need auth.token
to be executed first, then AuthTokenAuthenticate
but I can't find the way to do it because Lumen executes $app->middleware
routes first.
Laravel has $middlewarePriority
which is exactly what I need, but how can I handle it in Lumen?