public function tokenExist(User $user, $token) { if (in_array($token, $user->getTokens())) { return true; } else { return false; } }