How to Assigning Middleware to Route ?



How to Assigning Middleware to Route ?..

Answer / Gunjan Pandey

To assign a middleware to a route in Laravel, you can use the middle() method within the route definition. For example: `Route::get('/example', 'ExampleController@index')->middleware('middlewareName');`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Tell us do you have any experience with lamp?

1 Answers  


Is any server permissions required for laravel?

1 Answers  


Write code to upload a file in laravel 5?

1 Answers  


Do you know what is method spoofing in laravel?

1 Answers  


What is blade template?

1 Answers  


What is laravel eloquent?

1 Answers  


Explain me active record implementation. How to use it laravel?

1 Answers  


Which types of relationships are available in laravel eloquent?

1 Answers  


Explain automatic injection in laravel?

1 Answers  


What developed the laravel?

1 Answers  


Is laravel the best php framework?

1 Answers  


Explain the directory structure of laravel 5.6.

1 Answers  


Categories