Edit File: 2024_09_30_132522_create_packages_table.php
<?php use App\Enums\PeriodTypeEnum; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('packages', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('image')->nullable(); $table->string('price'); $table->integer('period'); // period $table->enum('period_type', PeriodTypeEnum::values()); $table->integer(column: 'is_active')->default(1); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('packages'); } };
Back to File Manager