A free open source IT asset/license management system
Updated method for eager loading assets
snipe53ba2bbb4e7b
diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.phpindex 5fd85b1bc2..5c1a5a9c08 100755--- a/app/Http/Controllers/UsersController.php+++ b/app/Http/Controllers/UsersController.php@@ -552,7 +552,7 @@ class UsersController extends Controller*/public function show($userId = null){- if(!$user = User::with('assignedAssets', 'assignedAssets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find($userId)) {+ if(!$user = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find($userId)) {$error = trans('admin/users/message.user_not_found', compact('id'));// Redirect to the user management pagereturn redirect()->route('users.index')->with('error', $error);