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 fetch data from database in laravel?
What is blueprint in laravel?
What is middleware in laravel?
Explain bundles in laravel?
What is chunk in laravel?
Do you know what is http middleware?
How to add a middleware in route group?
List available types of relationships in laravel eloquent.
What is laravel and why it is used?
What route model binding?
What is uuid in laravel?
What is laravel service container?