EloquentEnum
trait EloquentEnum mixin BackedEnum
Several enums used to be eloquent models and were changed to int-backed enums later.
This trait offers some of the eloquent functionality for int-backed enums.
Methods
static EloquentEnum
findOrFail(int|string $id)
No description
static Collection
pluckById(EloquentEnum|null $except = null)
Helper to imitate the original ->pluck('name', 'id') behaviour
Details
at line 14
static EloquentEnum
findOrFail(int|string $id)
No description
at line 22
static Collection
pluckById(EloquentEnum|null $except = null)
Helper to imitate the original ->pluck('name', 'id') behaviour