Skip to content

Instantly share code, notes, and snippets.

@Asikur22
Last active April 6, 2022 04:12
Show Gist options
  • Save Asikur22/3cadd1974ffc9fa2643a94ca9ebcc65a to your computer and use it in GitHub Desktop.
Save Asikur22/3cadd1974ffc9fa2643a94ca9ebcc65a to your computer and use it in GitHub Desktop.
Laravel Create Controller with terminal
php artisan make:model Todo -mcrf
  • -m, --migration Create a new migration file for the model.
  • -c, --controller Create a new controller for the model.
  • -r, --resource Indicates if the generated controller should be a resource controller
  • -f, --factory Create a new Factory file for this model.
Model created successfully.
Factory created successfully.
Created Migration: 2022_04_06_040656_create_todos_table
Controller created successfully.
php artisan make:model Todo -a
  • -a, --all Generate a migration, factory, and resource controller for the model
Model Model created successfully.
Factory created successfully.
Created Migration: 2022_04_06_040920_create_todos_table
Seeder created successfully.
Request created successfully.
Request created successfully.
Controller created successfully.
Policy created successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment