#4 - users CRUD (#24)

* #2 - wip

* #2 - wip

* #2 - ui fixes to login page

* #2 - fix

* #2 - fix

* #4- wip

* #4 - wip

* #4 - wip

* #4 - wip

* #4- wip

* #4 - wip

* #4 - wip

* #4 - tests

* #4 - ecs fix

* #4 - fix

* #4 - wip

* #4 - fix

* #4 - fix

* #4 - fix composer

* #4 - cr fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-01-19 10:55:10 +01:00
committed by GitHub
parent 91bd46cc36
commit 9aa2d5ec0f
41 changed files with 1977 additions and 63 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 [
@@ -15,7 +17,10 @@ class UserResource extends JsonResource
"name" => $this->name,
"email" => $this->email,
"role" => "Human Resources Manager",
"avatar" => "https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
"avatar" => asset($this->avatar),
"deleted" => $this->trashed(),
"employmentForm" => $this->employment_form->label(),
"employmentDate" => $this->employment_date->toDisplayString(),
];
}
}