> */ public function rules(): array { return [ 'role' => [ 'string', Rule::enum(Role::class), ], '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')); } }