12345678910111213141516171819202122232425 |
- <?php
- namespace App\Http\Resources\API;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class ShareFileByObjectResource extends JsonResource
- {
- /**
- * Transform the resource into an array.
- *
- * @return array<string, mixed>
- */
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'uuid' => $this->uuid,
- 'expiration_time' => (string)$this->expiration_time,
- 'created_by' => new UserProfileResource($this->createdBy),
- 'file_ids' => $this->files,
- ];
- }
- }
|