What is Middleware Parameters ?

Answer Posted / nafees ahmad

We can also pass parameters with the Middleware.
The middleware that we create contains the following function and we can pass our custom argument after the $next argument.
Example : public function handle($request, Closure $next)
{
return $next($request);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is laravel safe from sql injection?

501


How to use laravel framework in php?

503


How to set database connection in laravel?

535


Do you know what is php artisan. List out some artisan commands?

528


What are service providers in laravel?

549


What is reverse routing in laravel?

650


What is response macros?

523


How to check request is ajax or not?

569


How can we use middleware in laravel?

539


How to pass custom table name in model?

544


what is Blade ?

1033


How do laravel facades work?

535


How to get Retrieving a Cookie in Laravel ?

1174


Is laravel an mvc framework?

530


What do you understand by unit testing?

585