Skip to content

Instantly share code, notes, and snippets.

@simoebenhida
Created June 25, 2019 14:17
Show Gist options
  • Save simoebenhida/3aa56bc120c852a7fd1bfdaf94ea5c2b to your computer and use it in GitHub Desktop.
Save simoebenhida/3aa56bc120c852a7fd1bfdaf94ea5c2b to your computer and use it in GitHub Desktop.
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