id(); $table->string('title'); $table->string('slug')->unique(); $table->text('description')->nullable(); $table->integer('prep_time')->nullable()->comment('Minutes'); $table->integer('cook_time')->nullable()->comment('Minutes'); $table->integer('total_time')->nullable()->comment('Minutes'); $table->integer('servings')->nullable(); $table->string('difficulty')->nullable(); $table->string('cuisine')->nullable(); $table->string('category')->nullable(); $table->integer('calories')->nullable(); $table->string('featured_image')->nullable(); $table->string('video_url')->nullable(); $table->tinyInteger('status')->default(0)->comment('0=draft, 1=published'); $table->unsignedBigInteger('views_count')->default(0); $table->decimal('rating_avg', 3, 2)->nullable(); $table->unsignedInteger('rating_count')->default(0); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('recipes'); } };