Laravel: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
Created page with "== Database Setup == # Create the database # Add database info in app/config/database.php # php artisan migrate:install To add a migration php artisan migrate:make migratio..."
 
Line 7: Line 7:
   php artisan migrate:make migration_name
   php artisan migrate:make migration_name
That file will appear in app/database/migrations
That file will appear in app/database/migrations
Note that $table->increments('id') automatically makes that the primary key.

Revision as of 20:49, 12 March 2014

Database Setup

  1. Create the database
  2. Add database info in app/config/database.php
  3. php artisan migrate:install

To add a migration

 php artisan migrate:make migration_name

That file will appear in app/database/migrations

Note that $table->increments('id') automatically makes that the primary key.