id(); $table->string('title')->nullable(); $table->string('slug')->nullable(); $table->text('cliffhanger')->nullable(); $table->mediumText('excerpt')->nullable(); $table->foreignId('author_id')->nullable(); $table->datetime('publish_date')->nullable(); $table->boolean('featured')->default(false); $table->string('featured_image')->nullable(); $table->enum('editor', ['editorjs', 'markdown'])->default('editorjs'); $table->json('body')->nullable(); $table->enum('post_format', ['standard'])->default('standard'); $table->integer('comment_count')->default(0); $table->integer('likes_count')->default(0); $table->enum('status', ['publish', 'future', 'draft', 'private', 'trash'])->default('draft'); $table->timestamps(); $table->foreign('author_id')->references('id')->on('authors'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('posts'); } };