tokenName = $tokenName; } public function includeUser(User $user) { $transformer = new UserTransformer($this->account, $this->serializer); return $this->includeItem($user, $transformer, 'user'); } public function transform(User $user) { return [ 'account_key' => $user->account->account_key, 'name' => $user->account->present()->name, 'token' => $user->account->getToken($user->id, $this->tokenName), 'default_url' => SITE_URL ]; } }