What is Middleware Parameters ?

Answers were Sorted based on User's Feedback



What is Middleware Parameters ?..

Answer / 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

What is Middleware Parameters ?..

Answer / Shikha Rai

Middleware parameters are variables passed to a middleware class constructor. These parameters can be used within the middleware to customize its behavior.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Explain how to create custom middleware in laravel?

1 Answers  


What is namespace in php laravel?

1 Answers  


What do you know about facades in laravel? Explain.

1 Answers  


How can I learn laravel fast?

1 Answers  


How to enable multiple php versions in homestead?

1 Answers  


How does the ioc (inversion of control) container work?

1 Answers  


Do you know validations in laravel?

1 Answers  


Is laravel good for api?

1 Answers  


Is laravel an mvc?

1 Answers  


What is reverse path multicasting?

1 Answers  


Explain the request life cycle of laravel?

1 Answers  


What is algolia search?

1 Answers  


Categories