id(); $table->string('title'); $table->string('slug')->unique(); $table->longText('content'); $table->string('template')->nullable(); $table->json('custom_fields')->nullable(); $table->string('status')->default('draft'); // draft, published $table->text('meta_description')->nullable(); $table->json('meta_keywords')->nullable(); $table->foreignId('parent_id')->nullable()->constrained('pages')->nullOnDelete(); $table->integer('sort_order')->default(0); $table->timestamp('published_at')->nullable(); $table->foreignId('created_by_user_id')->constrained('users')->cascadeOnDelete(); $table->foreignId('last_updated_by_user_id')->nullable()->constrained('users')->nullOnDelete(); $table->softDeletes(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('pages'); } };