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 blade laravel?
What do you mean by terminable middleware?
Explain how to share your homestead with others?
Describe laravel service provider?
Have you used lumen before?
What is Named Routes.
Explain me active record implementation. How to use it laravel?
Do you know about laravel project?
What is a Terminable Middleware ?
How to use delete statement in laravel?
List types of the relationships supported by laravel?
Explain the middlewares in laravel?
What is report method?
What is backend framework?
Explain reverse routing in laravel.