showBillableRate = $showBillableRate; } /** * Transform the resource into an array. * * @return array */ public function toArray(Request $request): array { return [ /** @var string $id ID */ 'id' => $this->resource->id, /** @var string $name Name */ 'name' => $this->resource->name, /** @var bool $color Personal organizations automatically created after registration */ 'is_personal' => $this->resource->personal_team, /** @var int|null $billable_rate Billable rate in cents per hour */ 'billable_rate' => $this->showBillableRate ? $this->resource->billable_rate : null, /** @var bool $employees_can_see_billable_rates Can members of the organization with role "employee" see the billable rates */ 'employees_can_see_billable_rates' => $this->resource->employees_can_see_billable_rates, ]; } }