OwlCyberSecurity - MANAGER
Edit File: 2023_12_18_120734_create_landings_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('landings', function (Blueprint $table) { $table->id(); $table->string('title'); $table->string('slug')->unique()->index(); $table->text('excerpt'); $table->text('body'); $table->foreignId('created_by')->constrained('users'); $table->boolean('is_show')->default('1'); $table->bigInteger('file_id')->nullable(); $table->bigInteger('view_count')->default('0'); $table->softDeletes(); $table->timestamps(); $table->index(['slug', 'is_show']); $table->index(['slug', 'is_show', 'deleted_at']); $table->index(['title']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('landings'); } };