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.
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community