This commit is contained in:
Adrian Hopek
2022-01-18 15:01:34 +01:00
parent 5d580a71d0
commit e59ae4a855
18 changed files with 40 additions and 37 deletions

View File

@@ -8,6 +8,8 @@ use Illuminate\Http\Resources\Json\JsonResource;
class UserResource extends JsonResource
{
public static $wrap = false;
public function toArray($request): array
{
return [
@@ -16,7 +18,7 @@ class UserResource extends JsonResource
"email" => $this->email,
"role" => "Human Resources Manager",
"avatar" => asset($this->avatar),
"trashed" => $this->trashed(),
"deleted" => $this->trashed(),
"employmentForm" => $this->employment_form->label(),
"employmentDate" => $this->employment_date->toDisplayString(),
];