id(); $table->enum('status', OrderStatus::cases()); $table->decimal('total', total: 10, places: 2); $table->timestamps(); }); Schema::create('order_product', function (Blueprint $table) { $table->id(); $table->foreignId('order_id')->constrained()->cascadeOnDelete(); $table->foreignId('product_id')->constrained()->cascadeOnDelete(); $table->unsignedInteger('quantity'); $table->decimal('price', total: 8, places: 2); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('order_product'); Schema::dropIfExists('orders'); } };