protected function guardAgainstInvalidRequest()
 {
     if (!request()->has('token')) {
         throw InvalidRequest::tokenNotFound();
     }
     $validTokens = $this->config->get('token');
     if (!is_array($validTokens)) {
         $validTokens = [$validTokens];
     }
     if (!in_array($this->request->get('token'), $validTokens)) {
         throw InvalidRequest::invalidToken($this->request->get('token'));
     }
 }
 public function __construct(IlluminateRequest $request, Repository $config)
 {
     $this->request = Request::createFromIlluminateRequest($request);
     $this->config = collect($config->get('laravel-slack-slash-command'));
 }
 public static function noHandlerFound(Request $request)
 {
     return new static('There is no handler found that can handle request ' . print_r($request->all(), true));
 }