laravel access dynamic url in middleware
//do this in your middleware
public function handle($request, Closure $next)
{
dd($request->route()->parameters());
return $next($request);
}
//or you can try this
public function handle($request, Closure $next)
{
dd($request->route('parameter_name'));
return $next($request);
}