File: /var/www/vaspayment.com/database/migrations/2024_02_09_131227_create_blogs_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('blogs', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('slug')->unique();
$table->text('description');
$table->longText('content');
$table->text('tag')->nullable();
$table->string('category');
$table->string('image')->nullable();
$table->string('resize_image')->nullable();
$table->string('status')->default('draft');
$table->unsignedBigInteger('views')->default(0);
$table->string('keywords')->nullable();
$table->string('meta_description')->nullable();
$table->string('author')->nullable();
$table->timestamp('publish_date')->nullable();
$table->integer('read_time')->nullable();
$table->boolean('featured')->default(false);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('blogs');
}
};