How can I remove all the boilerplate included in Laravel 5, such as bootstrap/authentication etc?
In laracasts lessons Jeffrey Way told about php artisan fresh
command, but there is no such command in stable release
To create a new migration, you can run the make:migration Artisan command and that will bootstrap a new class on your Laravel application, in the database/migrations folder. This class will contain a default boilerplate code.
The migrate:reset command is used to rollback all the migrations, i.e., it drops all the tables that you have created in your database. Syntax of migrate:reset command: php artisan migrate:reset. The above output shows that reset command rollbacks all the migrations.
The down method exists to run when the migration is rolled back, e.g: php artisan migrate:rollback will delete the table flights . You are expected to write code to reverse what was done in up , e.g: if up adds a new column; down deletes it. The down method only runs when you roll back the migration.
Unfortunately after that Laracasts episode was posted - Taylor removed the fresh
command on Dec 17 2014: https://github.com/laravel/framework/commit/37ebc7ecc693405a717239ca30e0586d0a71e4d3
For now you'll have to manually delete the files yourself. Or create a pull request to add it back in.
Update 27th Feb: As of today the artisan fresh
command is back in Laravel 5 https://github.com/laravel/framework/commit/c69ddcf4941f6b23349b882171c44e0071963647
Update 9th June: Sad news, as of Laravel 5.1 artisan fresh
command is removed again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With