Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is meant by Controller Middleware ?



What is meant by Controller Middleware ?..

Answer / amit khanna

Middleware can also be assigned to controller’s route or within your controller’s constructor and it can be used with controller also..
You can use the middleware method to assign middleware to the controller.
The registered middleware can also be restricted to certain method of the controller.


Assigning Middleware to Route


Route::get('profile', [
'middleware' => 'auth',
'uses' => 'UserController@showProfile'
]);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

How to set login page as default page in laravel?

0 Answers  


Explain the request life cycle of laravel?

0 Answers  


How will you explain events in laravel?

0 Answers  


What is the render method?

0 Answers  


What are route prefixes?

0 Answers  


How to run a php file in laravel?

0 Answers  


How to serve sites on valet?

0 Answers  


What is blade laravel?

0 Answers  


Explain named routes in laravel?

0 Answers  


How do I populate my database with sample data?

0 Answers  


How to disable maintaince mode in laravel?

0 Answers  


What do you understand by unit testing?

0 Answers  


Categories