How to define implicit controllers with crud methods in Laravel 5



Laravel allows you to easily define a single route to handle every action in a controller. First, define the route using the Route::controller method:

The controller method accepts two arguments. The first is the base URI the controller handles, while the second is the class name of the controller(localhost/projectname/conrollername/methodname). Next, just add methods to your controller, prefixed with the HTTP verb they respond to: