php artisan migrate:fresh
We all are familiar with refresh command. This will allow us rollback and re-run all migrations. This helps when we need to re-build database in development.
Coming to Laravel 5.5, migration fresh command introduced. This will skip all down method or rollback methods, will simply drop all tables, then run through up methods.
Below command output will elaborate more:
Command output showing the differences:
$ php artisan migrate:refresh Rolling back: 2014_10_12_100000_create_password_resets_table Rolled back: 2014_10_12_100000_create_password_resets_table Rolling back: 2014_10_12_000000_create_users_table Rolled back: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table
$ php artisan migrate:fresh Dropped all tables successfully. Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table
Main benefit of migrate:fresh method is, it has made down method optional. You can skip down method and still quickly reset local database.
Adds Front-end Presets
Since Laravel 5.3, the framework has added optional scaffolding of Bootstrap and Vue.js. This enables developer quickly get started creating next app idea with some of the latest tools.
In Laravel 5.5, Framwork has added command line utility to add presets like React, Bootstrap Only or None so developer does not require to change files but can add presets as he likes from command prompt only!
React Preset – The React preset command can be initialized through Artisan:
php artisan preset react
This will remove Vue.js scaffolding and adds react.
Bootstrap Preset = When we don’t want to include any JS scaffolding(React or Vue.js) but still wants to keep bootstrap css, this command is useful.
php artisan preset bootstrap
None Preset – Final preset option is “none” which will remove both Bootstrap and (Vue.js or React):
php artisan preset none