> */ public function rules(): array { return [ 'role' => [ 'string', Rule::enum(Role::class), ], // Billable rate in cents per hour (example: 8000 means 80.00 in the organization's currency) 'billable_rate' => array_merge( [ 'nullable', ], $this->moneyRules() ), ]; } public function getBillableRate(): ?int { $input = $this->input('billable_rate'); return $input !== null && $input !== 0 ? (int) $this->input('billable_rate') : null; } public function getRole(): Role { return Role::from($this->input('role')); } }