Laravel - Serialization - Customizing The Date Format Per Attribute
You may customize the serialization format of individual Eloquent date attributes by specifying the date format in the model's cast declarations:
protected $casts = [
'birthday' => 'date:Y-m-d',
'joined_at' => 'datetime:Y-m-d H:00',
];