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 |
What are the example of services?
How to check column is exists or not in a table using laravel?
What is a Retrieving Input ?
What is the best way to learn laravel?
How to create Facade in Laravel ?
What is fluent query builder in laravel?
What is laravel framework?
What do you know about csrf token in laravel? How can someone turn off csrf protection for a specific route?
List some features of laravel 5.0?
How to turn off crsf protection for specific route in laravel?
What is factory in laravel?
Tell us have you used lumen before?