Increase Your Code Quality by Using Laravel's Enum Casting
HTML-код
- Опубликовано: 4 авг 2024
- Learn how to cast a model property to an enum in Laravel.
0:00 - Intro
0:22 - Create Enum
2:07 - Explanation of Backed Enum
3:29 - Database migration
4:35 - Cast Enum
5:32 - Run migrations
6:10 - Test the enum cast
8:11 - Using the status enum
10:08 - Special function
Follow me:
/ nick_escobedo
/ nickescobedo
#php #enums #phpenums #laravel #laravelenums Наука
Please, if you want, assign a default value, it's possible
Default values are a good idea!