Laravel 5.2 Artisan Forest Controller

I execute the following command:

php artisan make:controller UserController

This successfully creates the Controller, but I want to back it up with all the basic methods. How can i do this?

+4
source share
1 answer

try this one

php artisan make:controller UserController --resource

abridged

php artisan make:controller UserController -r


For Laravel 5.4:

Added additional option.

php artisan make:controller UserController -m=[MODEL_NAME]

this will make the controller with the entire resource method and the corresponding model

+11
source

Source: https://habr.com/ru/post/1622305/


All Articles