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