getCarbonDate('date'); } public function getRate(): string { return (string) $this->get('rate'); } /** * The rules that the incoming request must be matched against. */ public function rules(): array { return [ 'date' => 'date|after:1900-01-01|before:2099-12-31', 'rate' => 'required|numeric|gt:0', ]; } }