/** * The attributes that should be cast. * * @var array */ protected $casts = [ 'created_at' => 'datetime:Y-m-d', ];
laravel日期字段carbon 输出格式转换
于 2023-11-13 13:27:39 首次发布
/** * The attributes that should be cast. * * @var array */ protected $casts = [ 'created_at' => 'datetime:Y-m-d', ];