Skip to content

Commit

Permalink
Add note about avoiding $casts property with enums.
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte authored Feb 6, 2025
1 parent a07467d commit aa3548f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/basic-usage/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ If you are using PHP 8.1+ you can implement Enums as native types.

Internally, Enums implicitly implement `\BackedEnum`, which is how this package recognizes that you're passing an Enum.

NOTE: Presently (version 6) this package does not support using `$casts` to specify enums on the `Permission` model. You can still use enums to reference things as shown below, just without declaring it in a `$casts` property.


## Code Requirements

Expand Down

0 comments on commit aa3548f

Please sign in to comment.