public function generateTokenById($id) { if (!is_null($user = $this->provider->retrieveById($id))) { return $this->jwt->fromUser($user); } }