// database/migrations/xxxx_create_products_table.php public function up() { Schema::create('products', function (Blueprint $table) { $table->id(); $table->foreignId('category_id')->constrained()->onDelete('cascade'); $table->string('name'); $table->string('slug')->unique(); $table->text('short_description'); $table->longText('description'); $table->decimal('price', 10, 2); $table->decimal('compare_price', 10, 2)->nullable(); $table->string('sku')->unique(); $table->enum('stock_status', ['in_stock', 'out_of_stock'])->default('in_stock'); $table->integer('quantity')->default(0); $table->string('main_image'); $table->json('sizes')->nullable(); $table->string('material')->nullable(); $table->boolean('is_featured')->default(false); $table->boolean('is_new_arrival')->default(false); $table->boolean('is_best_selling')->default(false); $table->integer('sold_count')->default(0); $table->timestamps(); }); }