public function isValidToken($token) { $check = Model::Wstoken()->where(['token', '=', (string) $token])->cursor()->count(); return $check == 1 ? true : false; }