Skip to content

Commit 63b7d8a

Browse files
authored
Merge pull request #3866 from Laravel-Backpack/suggest-select-from-array-in-enum
suggest select_from_array when enum field is not supported
2 parents ecc8a6d + b462ae0 commit 63b7d8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/Models/Traits/HasEnumFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static function getPossibleEnumValues($field_name)
2424
try {
2525
$type = DB::connection($connectionName)->select(DB::raw('SHOW COLUMNS FROM `'.$table_prefix.$instance->getTable().'` WHERE Field = "'.$field_name.'"'))[0]->Type;
2626
} catch (\Exception $e) {
27-
abort(500, 'Enum field type is not supported - it only works on MySQL.');
27+
abort(500, 'Enum field type is not supported - it only works on MySQL. Please use select_from_array instead.');
2828
}
2929

3030
preg_match('/^enum\((.*)\)$/', $type, $matches);

0 commit comments

Comments
 (0)