Laravel Middleware

https://laravel.com/docs/5.4/middleware

Middleware provides convenient mechanism for HTTP requests entering your application. For example, Laravel includes a middleware that verifies the user of your application is authenticated. If the user is not authenticated, the middleware will redirect the user to the login screen. However, if the user is authenticated, the middleware will allow the request to proceed further into the application.

Registering Middleware

Global middleware:

  • app/Http/Kernel.php
    • $routeMiddleware

 

Leave a comment