79653068

Date: 2025-06-04 15:23:13
Score: 5
Natty:
Report link

After 2 years, i'm now with Laravel 12, and i got the same problem.

In my first model,

protected function casts(): array
{
    return [
        'depot' => 'datetime',
    ];
}

it's ok, i have a UTC format.

In a second model :

protected function casts(): array
{
    return [
        'email_verified_at' => 'datetime',
        'validation_parcellaire' => 'datetime',
    ];
}

For the 2 fields i have "yyyy-mm-dd hh:mm:ss", why it doesn't cast on the second model ?

Regards

Reasons:
  • Blacklisted phrase (1): Regards
  • Blacklisted phrase (1): i got the same problem
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Delirium6