complete the model, controller, and migration

This commit is contained in:
Zain Fauzan Rofie Azizi
2018-05-15 12:13:06 +08:00
parent 6057f48d9e
commit 4d7b9b931f
4 changed files with 22 additions and 3 deletions
@@ -16,6 +16,14 @@ class CreateSoitemsTable extends Migration
Schema::create('soitems', function (Blueprint $table) {
$table->increments('id');
// foreign key for the so table
$table->unsignedInteger('so_id');
$table->foreign('so_id')
->references('id')->on('sos')
->onDelete('cascade')
->onUpdate('cascade');
$table->Integer('status')->default('0');
//Item details
$table->integer('order_id');
$table->integer('brand_no');