In laravel response I want to get values of "created_at" and 'updated_at" like this format (without seconds):
2022-02-22 04:07
I try to use :
protected $casts = [
'created_at' => 'datetime:Y-m-d H:i',
'updated_at' => 'datetime:Y-m-d H:i'
];
But not works, the datetime stills in default format.