samedi 26 décembre 2015

get url id in a middleware in Laravel 5

I'm making a middleware that check the ownership of an tournament.

So in the url, I have :

http://ift.tt/1NQn9vj

I need to get the "1" in $tournamentId

In the middleware, I only have $request and $closure parameters, so I tried

    $tournamentId = $request->get("tournamentId");

but nothing works...

Any idea how should I do it???



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire