protected $casts = [ 'created_at' => 'datetime:Y-m-d', ];
这个代码的真实用途是干嘛
我设置了以后,直接echo $user->created_at还是一样时分秒全出来啊,并没发现使用到这个Y-m-d格式
推荐文章: