GET teams - resources

This commit is contained in:
StudioTem committed 2023-01-17 10:28:42 +01:00
1 parent 7c45871646
commit 876a67604d
6 files changed
+105 -76

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class UserResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->firstname,
'surname' => $this->lastname,
'code' => $this->code,
'work_start' => $this->work_start,
'work_end' => $this->work_end,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}