Answers for "laravel access dynamic url in middleware"

PHP
1

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);
}
Posted by: Guest on March-09-2021

Code answers related to "laravel access dynamic url in middleware"

Browse Popular Code Answers by Language