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:1970-01-02|before:2038-01-17', 'rate' => 'required|numeric|gt:0', ]; } }