mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
Change 2021-01 to 2022-01
This commit is contained in:
parent
d1baa50b87
commit
3f8062e713
21 changed files with 43 additions and 43 deletions
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: 'PHP 8.1 enums can be used as model casts'
|
||||
tweet_id: '1479467948985126913'
|
||||
thread_slug: weekly-thread-2021-01
|
||||
thread_slug: weekly-thread-2022-01
|
||||
author_username: ryangjchandler
|
||||
images:
|
||||
- 'https://pbs.twimg.com/media/FIRla1cX0AUpxGS.jpg'
|
||||
|
|
@ -10,4 +10,4 @@ slug: php-81-enums-can-be-used-as-model-casts
|
|||
---
|
||||
🔥 Did you know that @laravelphp can cast model columns into instances an enum in PHP 8.1?
|
||||
|
||||
The example below will create an instance of `OrderStatus` based on variant value. If the `status` column has the value `shipped`, it will return the `OrderStatus::Shipped` variant.
|
||||
The example below will create an instance of `OrderStatus` based on variant value. If the `status` column has the value `shipped`, it will return the `OrderStatus::Shipped` variant.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue