A list of frequently used Laravel Artisan commands.

· · 1 year ago

Artisan Command Starters


To start, you can always use php artisan to see a basic list of commands.

Artisan make:


Scaffold basic login and registration views and routes:
make:auth

Create a new controller class:
make:controller

Create a new migration:
make:migration create_users_table --create=users

Create a Model along with migration, factory, controller, and resouce routes.
php artisan make:model Company -a

Artisan migrate:


Drop all tables and re-run all migrations:
migrate:fresh

Create the migration repository:
migrate:install

Reset and re-run all migrations:
migrate:refresh

Rollback all database migrations:
migrate:reset

Rollback the last database migration:
migrate:rollback

Show the status of each migration:
migrate:status

Add column to database table:
php artisan make:migration add_description --table="posts"