mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-06 08:35:35 +00:00
Updated method for eager loading assets
This commit is contained in:
@ -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 page
|
||||
return redirect()->route('users.index')->with('error', $error);
|
||||
|
||||
Reference in New Issue
Block a user