|
@@ -0,0 +1,34 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App\Http\Resources\API;
|
|
|
+
|
|
|
+use Illuminate\Http\Request;
|
|
|
+use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
+
|
|
|
+class ProjectDetailResource extends JsonResource
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Transform the resource into an array.
|
|
|
+ *
|
|
|
+ * @return array<string, mixed>
|
|
|
+ */
|
|
|
+ public function toArray(Request $request): array
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ 'id' => $this->id,
|
|
|
+ 'name' => $this->name,
|
|
|
+ 'code' => $this->code,
|
|
|
+ 'status' => $this->status,
|
|
|
+ 'const' => $this->const,
|
|
|
+ 'begin' => $this->begin,
|
|
|
+ 'end' => $this->end,
|
|
|
+ 'available_days' => $this->available_days,
|
|
|
+ 'latitude' => $this->latitude,
|
|
|
+ 'longitude' => $this->longitude,
|
|
|
+ 'type' => $this->type,
|
|
|
+ 'acl' => $this->acl,
|
|
|
+ 'whitelist' => $this->whitelist,
|
|
|
+ 'description' => $this->description,
|
|
|
+ ];
|
|
|
+ }
|
|
|
+}
|