Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

It seems that this Exception is just masking other errors. Only when I got rid of all dateTime related attributes (by setting them NULL), the real error was shown, and I could fix the actual problem. After that, the DateTime exception was not thrown anymore as well.

Last updated 1 year ago.
0

I have seen this before as well, one of the exception handlers serializes the attributes to create the error message, but if you have an object that can't be implicitly converted to a string (like DateTime) then it just fails and hides the original error.

I think I worked around the problem by using Carbon everywhere instead of DateTime.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.