repository = $repository; } /** * @param string $email * @return bool * @throws ResourceNotFoundException */ public function execute(string $email){ if(!$this->repository->where('email', $email)->first()){ throw new ResourceNotFoundException('Unable to find any record that matches the email address provided'); } return true; } }