Entity Classes and Time |
I'm confused on how best to proceed. I created a Model with an $allowedFields 'date_request'. I created an Entity class that has 'date_request' as one of its $attributes. My confusion stems from two places in the docs:
In using my 'date_request' field should I define it as a 'datetime' type in the $casts array or should I place it into the $dates array to mutate it automatically? Neither? Both?
What are the issues/benefits of these approaches in terms of the Entity and Time classes? Why bother with $dates at all if I have the ability to mutate via cast; more peculiarly if I can specify a cast that is nullable? |
Messages In This Thread |
Entity Classes and Time - by grimpirate - 02-03-2025, 12:44 PM
RE: Entity Classes and Time - by ozornick - 02-04-2025, 11:32 AM
RE: Entity Classes and Time - by grimpirate - 02-04-2025, 04:22 PM
RE: Entity Classes and Time - by ozornick - 02-04-2025, 11:14 PM
|