Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoanganh25991/c87dfa2c4518452d401c to your computer and use it in GitHub Desktop.
Save hoanganh25991/c87dfa2c4518452d401c to your computer and use it in GitHub Desktop.
Laravel: Schema create
<?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