Laravel Magazine
Type-Safe Laravel Models with Native PHP Enums
Tips

Type-Safe Laravel Models with Native PHP Enums

Cast Eloquent attributes to backed PHP enums to replace magic strings with real types, and give your enums behavior with helper methods.

Latest News

More Articles

Latest Links

Stay Updated

Subscribe to our newsletter

Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.

Weekly articles
We send a new issue of the newsletter every week on Friday.
No spam
We'll never share your email address and you can opt out at any time.