// database/migrations/xxxx_create_order_items_table.php public function up() { Schema::create('order_items', function (Blueprint $table) { $table->id(); $table->foreignId('order_id')->constrained()->onDelete('cascade'); $table->foreignId('product_id')->constrained(); $table->string('product_name'); $table->decimal('price', 10, 2); $table->integer('quantity'); $table->json('options')->nullable(); // e.g., size, framing $table->timestamps(); }); }