log = $log; } public function getDetail($id = null) { // when no user specified, lets assume we want to edit "me" if (!$id) { $id = Auth::user()->id; } // try to find given user $user = User::findOrFail($id); $actions = $this->log->getUserActions($id); $roles = UserRoles::getWithTranslations(); $states = UserStates::getWithTranslations(); return view('admin.userManagement.detail', [ 'user' => $user, 'states' => $states, 'roles' => $roles, 'actions' => $actions ]); } }