📜  从 datetime 到 dmY laravel 的日期转换 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:53.081000             🧑  作者: Mango

代码示例1
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
   'created_at' => 'datetime:Y-m-d',
   'updated_at' => 'datetime:Y-m-d',
   'deleted_at' => 'datetime:Y-m-d h:i:s'
];