Update 2022_02_06_194000_create_shoppingcart_items_table.php

This commit is contained in:
Patrick
2022-02-09 00:30:31 +01:00
committed by GitHub
parent db35da3c61
commit 0591b5913c

View File

@@ -23,6 +23,9 @@ class CreateShoppingcartItemsTable extends Migration
/* Make id and rowid primary so there can not be duplicates */
$table->primary(['cart_id', 'row_id']);
/* Columns required for the morphTo relationship being the id and FQCN of the model */
$table->morphs('model');
/* The price of the CartItem */
$table->unsignedBigInteger('price')->nullable();
$table->integer('qty')->nullable();