Last active
October 29, 2015 14:03
-
-
Save hoanganh25991/c87dfa2c4518452d401c to your computer and use it in GitHub Desktop.
Laravel: Schema create
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Schema::create('cats', function($table){ | |
$table->increments('id'); | |
$table->string('name'); | |
$table->date('date_of_birth'); | |
$table->integer('breed_id')->nullable(); | |
$table->timestamps(); | |
}); | |
Schema::create('breeds', function($table){ | |
$table->increments('id'); | |
$table->string('name'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment