时间:2021-07-01 10:21:17 帮助过:295人阅读
Timestamp?Int?
laravel框架中默认的ORM模型created_at,updated_at字段的数据类型是datetime
也可以改为int
public function fromDateTime($value){
return strtotime(parent::fromDateTime($value));
}
http://www.golaravel.com/laravel/docs/5.0/eloquent/#timestamps