Last active
January 17, 2023 05:20
-
-
Save Nemachtilli/c4bae32d9bb29a7550fe55e94cae4489 to your computer and use it in GitHub Desktop.
Enum in migration Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErrorException | |
Attempt to read property "value" on string | |
27▕ $table->enum("status", UnitType::cases())->default(UnitType::VIDEO->value); | |
$table->enum("status", ArticleStatus::forMigration())->default(ArticleStatus::Pending->value); | |
/*Esta si funciono*/ | |
$table->enum('unit_type', [ArticleStatus::Approved, ArticleStatus::Pending, ArticleStatus::Rejected])->default(ArticleStatus::Pending); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment