Laravel middleware get route parameter
A shorter syntax is:
$request->route('parameter_name');
Woops , I found the ans after checking dd($requests)
.
I can use $requests->club
to get parameter .
Thanks everyone.
if you are looking for the url parameters the best way of getting that from the resource routes in laravel 5.2 inside the middleware is below. Lets say you want to get id parameter form url club/edit/{id}
$request->route()->parameter('id');