jeudi 28 avril 2016

Can't access request parameters inside a middleware

I want to retrieve an id in the custom middleware that runs after following route: /quiz/1/edit. I expect, that the $route should contain 'id' => 1, but it doesn't. Why is that?

public function handle($request, Closure $next)
{
    dd($request->all()); // --> []
    . . .
}

The route declaration:

Route::resource('quiz', 'QuizzesController');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire