diff --git a/app/Models/PaymentMethod.php b/app/Models/PaymentMethod.php index 4a5b840..e74e72b 100644 --- a/app/Models/PaymentMethod.php +++ b/app/Models/PaymentMethod.php @@ -1,4 +1,4 @@ -<?php +foreignId('order_id')->constrained()->onUpdate('cascade')->onDelete('cascade'); $table->foreignId('product_id')->constrained()->onUpdate('cascade')->onDelete('cascade'); $table->integer('quantity'); - $table->decimal('price, 10, 2'); + $table->decimal('price', 10, 2); $table->timestamps(); }); } diff --git a/database/migrations/2023_01_01_000004_create_invoices_table.php b/database/migrations/2023_01_01_000004_create_invoices_table.php index 5a3c926..04288b9 100644 --- a/database/migrations/2023_01_01_000004_create_invoices_table.php +++ b/database/migrations/2023_01_01_000004_create_invoices_table.php @@ -28,6 +28,6 @@ public function up(): void */ public function down(): void { - Schema::dropIfExists('invoice'); + Schema::dropIfExists($this->table); } };