'inbox']); $companyId = getSelectedCompany(); $tags = getCompanyTags($companyId); return view('index', ['tickets' => $tickets, 'tags' => $tags]); } public function profile() { $company = getSelectedCompany(); $users = $users = User::where('role_id', '!=', 1) //->where('id', '!=', Auth::id()) ->join('company_users', 'users.id', '=', 'company_users.user_id') ->where('company_users.company_id', $company) ->select('users.*') ->get(); return view('profile', ['users' => $users]); } }