original_string: public function unsubscribe($token) {
  
          // Does the token exist in the list_unsubscribe_token database table?
          if (!$this->model->isTokenValid($token)) {
              return view('lasallecrmlistmanagement::subscribe-unsubscribe-list.token_invalid', [
                  'title'    => 'Invalid Unsubscribe Token',
              ]);
          }
  
          $emailID  = $this->model->getEmailIdByToken($token);
          $listID   = $this->model->getListIdByToken($token);
  
          // email address
          $email    = $this->emailRepository->getEmailByEmailId($emailID);
  
          // list's name
          $listName = $this->listRepository->getListnameByListId($listID);
  
          // Delete all list_unsubscribe_token records for this email_id and list_id
          $this->model->deleteAllTokensForListIDandEmailID($listID,$emailID);
  
          // un-enabled (ie, disable) the list_email database record for this email_id and list_id
          $this->list_EmailRepository->enabledFalse($emailID, $listID);
  
          return view('lasallecrmlistmanagement::subscribe-unsubscribe-list.unsubscribe_success', [
              'title'    => 'Unsubscribe Successful',
              'email'    => $email,
              'listName' => $listName
          ]);
      }
code: public function unsubscribe($token) {
  
          // Does the token exist in the list_unsubscribe_token database table?
          if (!$this->model->isTokenValid($token)) {
              return view('lasallecrmlistmanagement::subscribe-unsubscribe-list.token_invalid', [
                  'title'    => 'Invalid Unsubscribe Token',
              ]);
          }
  
          $emailID  = $this->model->getEmailIdByToken($token);
          $listID   = $this->model->getListIdByToken($token);
  
          // email address
          $email    = $this->emailRepository->getEmailByEmailId($emailID);
  
          // list's name
          $listName = $this->listRepository->getListnameByListId($listID);
  
          // Delete all list_unsubscribe_token records for this email_id and list_id
          $this->model->deleteAllTokensForListIDandEmailID($listID,$emailID);
  
          // un-enabled (ie, disable) the list_email database record for this email_id and list_id
          $this->list_EmailRepository->enabledFalse($emailID, $listID);
  
          return view('lasallecrmlistmanagement::subscribe-unsubscribe-list.unsubscribe_success', [
              'title'    => 'Unsubscribe Successful',
              'email'    => $email,
              'listName' => $listName
          ]);
      }
code_tokens: public function unsubscribe ( $ token ) { // Does the token exist in the list_unsubscribe_token database table? if ( ! $ this -> model -> isTokenValid ( $ token ) ) { return view ( 'lasallecrmlistmanagement::subscribe-unsubscribe-list.token_invalid' , [ 'title' => 'Invalid Unsubscribe Token' , ] ) ; } $ emailID = $ this -> model -> getEmailIdByToken ( $ token ) ; $ listID = $ this -> model -> getListIdByToken ( $ token ) ; // email address $ email = $ this -> emailRepository -> getEmailByEmailId ( $ emailID ) ; // list's name $ listName = $ this -> listRepository -> getListnameByListId ( $ listID ) ; // Delete all list_unsubscribe_token records for this email_id and list_id $ this -> model -> deleteAllTokensForListIDandEmailID ( $ listID , $ emailID ) ; // un-enabled (ie, disable) the list_email database record for this email_id and list_id $ this -> list_EmailRepository -> enabledFalse ( $ emailID , $ listID ) ; return view ( 'lasallecrmlistmanagement::subscribe-unsubscribe-list.unsubscribe_success' , [ 'title' => 'Unsubscribe Successful' , 'email' => $ email , 'listName' => $ listName ] ) ; }
docstring: Unsubscribe from a LaSalleCRM email list
  
  @param $token
docstring_tokens: Unsubscribe from a LaSalleCRM email list