what is meant by Global Middleware and Route Middleware ?
Answer Posted / rishabh khanna
The Global Middleware will run on every HTTP request of the application, whereas the Route Middleware will be assigned to a specific route.
The middleware can be registered at app/Http/Kernel.php.
This file contains two properties $middleware and $routeMiddleware.
Middleware property is used to register Global Middleware.
To register the global middleware, list the class at the end of $middleware property.
RouteMiddleware property is used to register route specific middleware.
To register the route specific middleware, add the key and value to $routeMiddleware property.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is laravel 5 homestead?
List types of relationships available in laravel eloquent?
How to retrive/get current environment in laravel.
What is eager loading in laravel?
What is redis?
When laravel was launched?
How to enable the query logging?
Why are migrations important?
Tell me what are the official packages provided by laravel?
State the difference between authentication and authorization.
What is laravel echo?
What is routing in laravel 5 and how we can use it?
Explain validation concept in laravel.
Explain the directory structure of laravel 5.6.
Tell me how can you display html with blade in laravel?