Laravel: Difference between revisions
Jump to navigation
Jump to search
Adamcolton (talk | contribs) 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..." |
Adamcolton (talk | contribs) |
||
| 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
- Create the database
- Add database info in app/config/database.php
- 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.