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 view composers?
What is laravel artisan?
Do you know what is http middleware?
How to get user’s ip address in laravel?
How to use aggregate functions in laravel query?
What are controllers in laravel?
What is the best way to learn laravel?
Explain me what is your favorite feature of laravel?
What is ioc container in laravel?
What is laravel model?
Do you know what is php artisan.
How to turn off crsf protection for specific route in laravel?