public function checkToken() { $this->_methodName = 'checkToken'; $this->resolveParams(); $arNeed = ['tokenCheck' => 'required']; $this->checkAttr($arNeed); $reg_user = \App\Users::whereToken($this->_request_params['tokenCheck'])->first(); if (!is_null($reg_user)) { return $this; } else { throw new \App\Exceptions\ExceptionApiUserNotFound($this->_request_params, $this->_typeName, $this->_methodName); } }