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 |
How to set login page as default page in laravel?
Explain the request life cycle of laravel?
How will you explain events in laravel?
What is the render method?
What are route prefixes?
How to run a php file in laravel?
How to serve sites on valet?
What is blade laravel?
Explain named routes in laravel?
How do I populate my database with sample data?
How to disable maintaince mode in laravel?
What do you understand by unit testing?