We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following migration rule does not work because cases() returns an array of enum objects rather than an array of strings:
cases()
$table->enum('status', TransactionStatus::cases());
names() and values() functions would be nice in this case, they would return an array with strings.
names()
values()
Example:
public static function names(): array { return array_column(self::cases(), 'name'); }
The text was updated successfully, but these errors were encountered:
This is already possible with Subset.
$table->enum('status', TransactionStatus::of()->names());
be aware though that migrations should reflect the state after this migration ran.
Sorry, something went wrong.
I overlooked that one, seems like a solution!
No branches or pull requests
The following migration rule does not work because
cases()
returns an array of enum objects rather than an array of strings:names()
andvalues()
functions would be nice in this case, they would return an array with strings.Example:
The text was updated successfully, but these errors were encountered: