-
Description of the Problem: Expected Behavior: Actual Behavior: Steps to Reproduce:
Model:
Function:
Right now I'm using a conversation:
to be able to save the date and time as a string, but I need it to be saved as a date. My document with toIso8601String():
My document only carbon function:
For fields: diaCriacao, updated_at and created_at the datetime field is set successfully, however for the date inside the array I can't make it work. In the model, the casts, I have already tried several ways and none of them worked. I've already tried:
and none of them worked. Has anyone gone through this? Is there any solution I can apply? I appreciate everyone's attention and help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I solved the problem as follows:
I keep getting an error on the line
and I don't know if this is the correct way to deal with this problem, however it worked for me. If anyone has a more elegant solution, or one that is actually correct, please let me know. |
Beta Was this translation helpful? Give feedback.
-
From laravel-mongodb version 5, all dates are recursively converted to |
Beta Was this translation helpful? Give feedback.
I solved the problem as follows: