// Project entity
protected $casts = [
'id' => 'int',
'user_id' => 'int',
'name' => 'string',
'link' => 'string',
'archival' => 'string',
'created_at' => 'datetime',
];
// Controller send response
return $this->response->setJSON($project);
// Get response after CURLRequest
{
"id": 1,
"user_id": 1,
"name": "Project #1",
"link": "https://ya.ru",
"archival": "no",
"created_at": {
"date": "2023-11-25 10:20:35.000000",
"timezone_type": 3,
"timezone": "Europe/Moscow"
}
}