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
Difference between Authentication and Authorization ?
How to write html code in laravel controller?
What is routing in laravel?
Please explain what is laravel?
How do I register a middleware?
How to Deleting Session Data in Laravel ?
What is oauth2 in laravel?
Tell me how to set database connection in laravel?
How can we implement a package in laravel?
Explain how to retrive all requested data in laravel?
How will you explain middleware in laravel?
How to configure cron jobs in homestead?
How to redirect form controller to view file in laravel?
How can we use the custom table in laravel?
Tell me why doesn't laravel use semantic versioning?