Generating a controller

Leave a comment

August 6, 2016 by movefirstblog

By default Laravel 5.2 create a “plain” controller with no methods.

php artisan make:controller ControllerName

 

To create a controller with RESTful methods included we need to append –resource to the end of the command.

php artisan make:controller ControllerName --resource

 

For more information see:

Laravel 5.2 – Restful Resource Controllers – Default plain

Laravel 5.1 – Restful Resource Controllers – Default resource

Laravel 5.0 – Restful Resource Controllers – Default resource

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: