(string)$this->encodePrimaryKey($account->id), 'default_url' => config('ninja.site_url'), 'plan' => $account->getPlan(), ]; } public function includeCompanyUsers(Account $account) { $transformer = new CompanyUserTransformer($this->serializer); return $this->includeCollection($account->company_users, $transformer, CompanyUser::class); } public function includeDefaultCompany(Account $account) { $transformer = new CompanyTransformer($this->serializer); return $this->includeItem($account->default_company, $transformer, Company::class); } public function includeUser(Account $account) { $transformer = new UserTransformer($this->serializer); return $this->includeItem(auth()->user(), $transformer, User::class); // return $this->includeItem($account->default_company->owner(), $transformer, User::class); } }