id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('title'); $table->longText('content'); $table->string('slug')->unique(); $table->string('status')->default('draft'); $table->timestamps(); $table->index(['user_id', 'created_at']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('posts'); } };