Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Created August 31, 2021 23:36
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 acidjazz/4b766925f5d8fc9dac32d58b7a68d9ad to your computer and use it in GitHub Desktop.
Save acidjazz/4b766925f5d8fc9dac32d58b7a68d9ad to your computer and use it in GitHub Desktop.
<?
Schema::create('orders', function (Blueprint $table) {
$table->id();
$table->string('table')->nullable();
$table->foreignIdFor(Rst::class)->constrained();
$table->foreignIdFor(Loc::class)->constrained();
});
Schema::create('order_menu', function (Blueprint $table) {
$table->foreignIdFor(Order::class)->constrained();
$table->foreignIdFor(Menu::class)->constrained();
});
Schema::create('order_choice', function (Blueprint $table) {
$table->foreignIdFor(Order::class)->constrained();
$table->foreignIdFor(Menu::class)->constrained();
$table->foreignIdFor(Choice::class)->constrained();
});
Schema::create('order_option', function (Blueprint $table) {
$table->foreignIdFor(Order::class)->constrained();
$table->foreignIdFor(Menu::class)->constrained();
$table->foreignIdFor(Choice::class)->constrained();
$table->foreignIdFor(Option::class)->constrained();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment