我$dates在Quota Eloquent模型上有我的属性,如下所示:
$dates
protected $dates = ['start', 'end'];
从数据库中检索数据时,这些字段不会设置为Carbon实例,而是设置为字符串.同样的事情created_at和updated_at属性.
created_at
updated_at
有什么想法会发生什么?我在MySQL数据库上使用TIMESTAMPS字段,而Laravel版本是5.2.
php mysql date eloquent laravel-5.2
date ×1
eloquent ×1
laravel-5.2 ×1
mysql ×1
php ×1