What is Laravel - Middleware ?



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

Post New Answer

More Laravel PHP Framework Interview Questions

Explain the concept of routing in laravel.

0 Answers  


How auth is used?

0 Answers  


How to get current environment in laravel?

0 Answers  


How to Configuration Laravel - Encryption ?

1 Answers  


Please explain the difference between laravel and codeigniter?

0 Answers  


Is laravel nova free?

0 Answers  


What is orm framework?

0 Answers  


What are the operations perfom while Connecting the Database ?

1 Answers  


What is uuid in laravel?

0 Answers  


What is the use of php compact function?

0 Answers  


What is double submit cookie?

0 Answers  


Explain how to upgrade valet to valet 2.0?

0 Answers  


Categories