Answer Posted / sunil kumar
Middleware acts as a bridge between a request and a response. It is a type of filtering mechanism.
Laravel includes a middleware that verifies whether the user of the application is authenticated or not.
If the user is authenticated, it redirects to the home page otherwise, if not, it redirects to the login page.
It can be create by executing the following command - php artisan make:middleware <middleware-name>.
Replace the <middleware-name> with the name of your middleware. The middleware that you create can be seen at app/Http/Middleware directory.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to get Retrieving the Request URI ?
What version of laravel do you generally use?
What is database migration. How to create migration via artisan?
How to get requested path in laravel?
Explain me active record implementation. How to use it laravel?
What do you understand by orm?
How can we get the user's ip address in laravel?
What is meant by Forms in Laravel ?
Tell me when laravel was launched?
Provide system requirements for installation of laravel framework?
What are the databases laravel supports?
What is database migration in laravel? How to use this?
Explain how to resolve class instance out of the container in laravel?
What are the site types supported by homestead?
How to Accessing Session Data in Laravel ?