getStart(), end: $this->getEnd(), ); } public function authorize(): bool { return $this->authService->check(); } public function getStart(): ?CarbonInterface { return $this->has('start') ? Date::parse($this->string('start')->value()) : null; } public function getEnd(): ?CarbonInterface { return $this->has('end') ? Date::parse($this->string('end')->value()) : null; } /** @return array */ public function rules(): array { return [ 'start' => ['required_with:end', 'date'], 'end' => ['required_with:start', 'date'], ]; } }