Skip to content

Instantly share code, notes, and snippets.

@TommyZG
Last active November 19, 2017 15:26
Show Gist options
  • Save TommyZG/f1ac5144dbf1cc793a8d396691ea0507 to your computer and use it in GitHub Desktop.
Save TommyZG/f1ac5144dbf1cc793a8d396691ea0507 to your computer and use it in GitHub Desktop.
Laravel 5.5 commands reference
php artisan make:migration create_users_table --create=users
php artisan migrate
# To rollback the latest migration operation, you may use the rollback command. This command rolls back the last "batch" of migrations, which may include multiple migration files:
php artisan migrate:rollback
#The migrate:reset command will roll back all of your application's migrations:
php artisan migrate:reset
#The migrate:fresh command will drop all tables from the database and then execute the migrate command:
php artisan migrate:fresh
php artisan migrate:fresh --seed
#The migrate:refresh command will roll back all of your migrations and then execute the migrate command. This command effectively re-creates your entire database:
php artisan migrate:refresh
#Refresh the database and run all database seeds...
php artisan migrate:refresh --seed
#It just regenerates the list of all classes that need to be included in the project (autoload_classmap.php). Ideal for when you have a new class inside your project.
composer dump-autoload -o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment