What is meant by Controller Middleware ?



What is meant by Controller Middleware ?..

Answer / amit khanna

Middleware can also be assigned to controller’s route or within your controller’s constructor and it can be used with controller also..
You can use the middleware method to assign middleware to the controller.
The registered middleware can also be restricted to certain method of the controller.


Assigning Middleware to Route


Route::get('profile', [
'middleware' => 'auth',
'uses' => 'UserController@showProfile'
]);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What are the example of services?

0 Answers  


How to check column is exists or not in a table using laravel?

0 Answers  


What is a Retrieving Input ?

0 Answers  


What is the best way to learn laravel?

0 Answers  


How to create Facade in Laravel ?

1 Answers  


What is fluent query builder in laravel?

0 Answers  


What is laravel framework?

0 Answers  


What do you know about csrf token in laravel? How can someone turn off csrf protection for a specific route?

0 Answers  


List some features of laravel 5.0?

0 Answers  


How to turn off crsf protection for specific route in laravel?

0 Answers  


What is factory in laravel?

0 Answers  


Tell us have you used lumen before?

0 Answers  


Categories