12345678910111213141516171819202122232425262728 |
- <?php
- namespace App\Http\Resources\API;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class LibraryResource 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,
- 'asset_id' => $this->asset_id,
- 'project_id' => $this->project_id,
- 'acl' => $this->acl,
- 'whitelist' => make_array_list($this->whitelist??''),
- 'created_at' => (string)$this->created_at,
- 'updated_at' => (string)$this->updated_at,
- ];
- }
- }
|