lundi 5 décembre 2016

Passing parameters to middleware in laravel

lets say l have a route pointing to middleware;

Route::get("/user/{id}", ['middleware' => 'auth', function ($id) {

}]);

and my middleware code is as follows:

public function handle($request, Closure $next) { return $next($request); }

if l want to use $id in the middleware, how do l do that?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2g2chA2
via IFTTT

Aucun commentaire:

Enregistrer un commentaire