From the docs I can see that to pass a parameter editor to a middleware role you write
Route::put('post/{id}', ['middleware' => 'role:editor', function ($id) {
...
}]);
And to use the parameter in the middleware, you simply pass the parameter into the handle function
public function handle($request, Closure $next, $role)
{
...
}
My question is, where is this editor parameter coming from? I can only see the id in the URL string being passed about.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire