// database/migrations/xxxx_create_product_images_table.php public function up() { Schema::create('product_images', function (Blueprint $table) { $table->id(); $table->foreignId('product_id')->constrained()->onDelete('cascade'); $table->string('image'); $table->timestamps(); }); }