Answers for "date casting from datetime to d-m-Y laravel using cast"

PHP
1

date casting from datetime to d-m-Y laravel using cast

/**
* 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'
];
Posted by: Guest on August-29-2021

Code answers related to "date casting from datetime to d-m-Y laravel using cast"

Browse Popular Code Answers by Language