Created
June 25, 2019 14:17
-
-
Save simoebenhida/3aa56bc120c852a7fd1bfdaf94ea5c2b to your computer and use it in GitHub Desktop.
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
public function up() | |
{ | |
Schema::create('work', function (Blueprint $table) { | |
$table->increments('id'); | |
$table->string('Nom'); | |
$table->timestamps(); | |
}); | |
Schema::table('people', function (Blueprint $table) { | |
$table->unsignedInteger('work_id'); | |
$table->foreign('work_id')->references('id')->on('work'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment