Laravel 4 Tutorial Part 2 – Migrations and Artisan

Log — Tags: , — Posted by Starck on March 31, 2013


Migrations Installation

migrate:install : it will crate a migrations table for record any changes of database.

Making a new migration record

migrate:make (create|remove)_tablename_table

The --table and --create options may also be used to indicate the name of the table, and whether the migration will be creating a new table:

$ php artisan migrate:make create_authors_table --table=authors --create

Running All Outstanding Migrations

$ php artisan migrate

To seed your database, you may use the db:seed command on the Artisan CLI:

$ php artisan db:seed

Rollback all migrations and run them all again

$ php artisan migrate:refresh --seed


Check routes status: $ php artisan routes

Clear auto-load files: $ php artisan clear-compiled

Re-generate auto-load files: $ php artisan dump-autoload

(c) 2022 Starck Lin | powered by WordPress