Route in Laravel

In the Laravel route there are 2 ways:

  1. Direct load view file from the route, No need to go to controller.
  2. Go to the Controller and perform the operation then load the view file.

Here you can see the ‘resources/views/welcome.blade.php’ file load directly.

 

url route to method of controller.

‘product/{id}’ : url with parameter

‘ProductController@detail’ : ProductController is controller and detail is method

Leave a Reply

Your email address will not be published. Required fields are marked *