Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('cart', function (Blueprint $table) { |
||
17 | $table->id(); |
||
18 | $table->unsignedBigInteger('user_id'); |
||
19 | $table->unsignedBigInteger('product_item_id'); |
||
20 | $table->integer('quantity'); |
||
21 | |||
22 | $table->timestamps(); |
||
23 | |||
24 | //foreign |
||
25 | $table->foreign('user_id')->references('id')->on('users'); |
||
26 | $table->foreign('product_item_id')->references('id')->on('product_items'); |
||
27 | }); |
||
40 |