public function getUserAccountId($account) { $user = $account->users()->first(); $userAccount = $this->findUserAccounts($user->id); return $userAccount ? $userAccount->id : false; }