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 is uri in laravel?
What is laravel model?
What is ajax in laravel?
What is the difference between namespace and use in laravel?
List available types of relationships in laravel eloquent.
Explain bundles in laravel?
Explain me what directories that need to be writable laravel installation?
Which file is used to create a connection with the database?
What is meant by check method ?
what is a Listeners ?
What are controllers in laravel?
How will you check table is exists or in the database?