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 |
Where can I learn laravel?
How to get configuration values in laravel?
What is auth? How is it used?
How to resolve class instance out of the container in laravel?
How to use update statement in laravel?
What is csrf token in laravel?
Differce between contracts and facades?
In laravel, what is fillable attribute in a model?
What is boot method in laravel?
How to retrive current environment in laravel?
What are the requirements for laravel 5.8?
What is laravel dusk?