When generating a controller from the command line (
php artisan make:controller), you'll now find a new
--model flag. When called with the name of a model, Laravel will automatically generate a resourceful controller that includes the necessary boilerplate to inject this model in all relevant controller actions.
Published on Jan 23rd, 2017.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.