0

I have created a migration and added a new column expiry with the enum type.

public function up()
{
    Schema::table('admin_assignform', function (Blueprint $table) {
        $table->enum('expiry',['0','Daily', 'Weekly', 'Monthly','Quarterly','Yearly'])->comment('0:never')->after('formname')->default(0);
    });
}

and

run php artisan migrate

After that, I realize I can one more option in enum

public function up()
{
    Schema::table('admin_assignform', function (Blueprint $table) {
        $table->enum('expiry',['0','Daily', 'Weekly', 'Monthly','Quarterly','Yearly', 'Cycle'])->comment('0:never')->after('formname')->default(0);
    });
}

How can I add the 'Cycle' option in the enum default value?

Namoshek
  • 6,394
  • 2
  • 19
  • 31
Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51

0 Answers0