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 use where null and where not null eloquent query in laravel?
Explain collections in laravel.
Name databases supported by laravel.
Does laravel passport use jwt?
What are laravel’s contracts?
Explain validation concept in laravel.
List some default packages provided by laravel 5.6?
What is http middleware?
How can someone change the default database type in laravel?
How can we create a record in laravel using eloquent?
What is trait in laravel?
What is views in laravel?