From 09c6e328dbabd2937af623ce0cb84297c45a3243 Mon Sep 17 00:00:00 2001 From: alexPopaCode4 <156655986+alexPopaCode4@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:35:59 +0300 Subject: [PATCH] Add organisation description in api response (#181) --- app/Http/Controllers/OrganisationController.php | 1 + app/Http/Resources/OrganisationResource.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Http/Controllers/OrganisationController.php b/app/Http/Controllers/OrganisationController.php index 286ffc3..d8392ad 100644 --- a/app/Http/Controllers/OrganisationController.php +++ b/app/Http/Controllers/OrganisationController.php @@ -24,6 +24,7 @@ public function __invoke(): JsonResource 'type', 'status', 'area', + 'description', 'created_at', 'updated_at', ]) diff --git a/app/Http/Resources/OrganisationResource.php b/app/Http/Resources/OrganisationResource.php index dbea7dd..ff2d1a3 100644 --- a/app/Http/Resources/OrganisationResource.php +++ b/app/Http/Resources/OrganisationResource.php @@ -27,6 +27,7 @@ public function toArray(Request $request): array 'area' => $this->area, 'county' => $this->county->name, 'activity_counties' => IdAndNameResource::collection($this->activityCounties), + 'description' => $this->description, 'created_at' => $this->created_at->format('Y-m-d H:i:s'), 'updated_at' => $this->updated_at->format('Y-m-d H:i:s'), 'volunteers_count' => (int) $this->volunteers_count,