What is Laravel - Middleware ?
Answer / 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 |
Explain what is mvc architecture?
Explain events in laravel?
how we can upload files in laravel?
What is official website url of laravel?
What are the differences between laravel and codeigniter?
What is service providers in laravel?
What is meant by Forms in Laravel ?
What is escaping a string?
What is orm laravel use?
How to use multiple or condition in laravel query?
How to do subdomain routing in laravel?
What is trait in laravel?