I have a middleware added in the middleware group web which is used in my routes like
Route::group(['middleware' => ['web']], function () { // }
This web group includes multiple middleware which will be used to all routes inside the route group. I am setting these middleware like this
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\FeatureFlags::class
]
];
My problem here is in the FeatureFlag middleware, I want to pass a third parameter feature. Since the FeatureFlag parameter is initiated inside the web group, I have no idea how to pass the third parameter.
featurefrom the route which is inside thewebmiddleware