showBillableRates = $showBillableRates; } protected function collects(): ?string { return null; } /** * Transform the resource collection into an array. * * @return array> */ public function toArray(Request $request): array { return $this->collection->map(function (Project $project) use ($request): array { return (new ProjectResource($project, $this->showBillableRates)) ->toArray($request); })->all(); } }