$this->id, 'unit_id' => $this->unit_id, 'title' => $this->title, 'file_url' => $this->file_url ? Storage::url($this->file_url) : null, 'mime_type' => $this->mime_type, 'visible_to_franchisee' => $this->visible_to_franchisee, 'created_at' => Carbon::parse($this->created_at)->format('Y-m-d H:i:s'), 'updated_at' => Carbon::parse($this->updated_at)->format('Y-m-d H:i:s'), ]; } /** * @param \Illuminate\Database\Eloquent\Collection $resource * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection */ public static function collection($resource): AnonymousResourceCollection { return parent::collection($resource); } }