Enum PHP 8.1 Classes in Laravel: Practical Example

Опубликовано: 27 Сентябрь 2024
на канале: Laravel Daily
29,533
697

In the new PHP 8.1 version, you can use Enum classes. How would they work in Laravel? Let me show you an example.

Full repository: https://github.com/LaravelDaily/Larav...
Link to the Enum Pull Request: https://github.com/LaravelDaily/Larav...
PHP 8.1 Enums: https://stitcher.io/blog/php-enums
Enum casting in Laravel: https://laravel.com/docs/8.x/eloquent...
Twitter discussion about Enums:   / 1468922708457136131  

- - - - -
Support the channel by checking out premium products:
- Enroll in my Laravel courses: https://laraveldaily.teachable.com
- Try our Laravel QuickAdminPanel: https://bit.ly/quickadminpanel
- Buy my ready-made Laravel scripts: https://laraveldaily.gumroad.com
- Purchase my Livewire Kit: https://livewirekit.com
- Subscribe to my weekly newsletter: http://bit.ly/laravel-newsletter