Laravel5.4 Eloquent ORM use toArray error

wending posted 11 months ago

hi,everyone,nice too me you! i'm from chinese,I love the program, 18 years old this year. I really like Laravel,But encountered some problems, need your help, you can help me?

I really like to chat with you, have time to chat with it? Facebook? Twitter Gmail Wechat QQ TIM? And other....

Claused in Laravel use toArray function mistakes, I already know the reason is because I changed the created_at and updated_at type, before the timestamp, I changed to int, I just to optimize, but do not know the database Case solved, what do i need to do?

In the Model to add any function to solve the problem I have been encountered, so I hope you can help me, I also like to be friends with you, thank you!

(1/1) FatalThrowableError Type error: Argument 1 passed to Illuminate\Database\Eloquent\Model::serializeDate() must implement interface DateTimeInterface, integer given, called in E:\phpStudy\WWW\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\HasAttributes.php on line 122

enter image description here enter image description here

wending replied 11 months ago

I came here from Google,

wending replied 11 months ago

Well, I noticed the time difference, the current time in China is 20:31, and you are just morning, and may not work,

wending replied 11 months ago

I am here waiting for you

Sign in to participate in this thread!

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