id(); $table->string('title'); $table->string('slug')->unique(); $table->text('summary')->nullable(); $table->longText('content'); $table->string('content_type'); // blog, notice, document, related_news $table->string('status')->default('draft'); // draft, published, archived $table->string('access_level')->default('public'); // public, members, board, admin $table->string('featured_image_path')->nullable(); $table->string('featured_image_alt')->nullable(); $table->string('author_name')->nullable(); $table->foreignId('author_user_id')->nullable()->constrained('users')->nullOnDelete(); $table->text('meta_description')->nullable(); $table->json('meta_keywords')->nullable(); $table->boolean('is_pinned')->default(false); $table->integer('display_order')->default(0); $table->timestamp('published_at')->nullable(); $table->timestamp('expires_at')->nullable(); $table->timestamp('archived_at')->nullable(); $table->unsignedBigInteger('view_count')->default(0); $table->foreignId('created_by_user_id')->constrained('users')->cascadeOnDelete(); $table->foreignId('last_updated_by_user_id')->nullable()->constrained('users')->nullOnDelete(); $table->softDeletes(); $table->timestamps(); $table->index(['status', 'content_type', 'published_at']); $table->index('slug'); }); } public function down(): void { Schema::dropIfExists('articles'); } };