date casting from datetime to d m y laravel

Solutions on MaxInterview for date casting from datetime to d m y laravel by the best coders in the world

showing results for - "date casting from datetime to d m y laravel"
Jeremy
20 Oct 2020
1/**
2* The attributes that should be cast.
3*
4* @var array
5*/
6protected $casts = [
7   'created_at' => 'datetime:Y-m-d',
8   'updated_at' => 'datetime:Y-m-d',
9   'deleted_at' => 'datetime:Y-m-d h:i:s'
10];
11