src/Policies/UserPolicy.php
public function update($user, User $userToManage)
    {
        if ($userToManage->id == $user->id || $userToManage->superAdmin()) {
            return false;
        }

        $user = User::findOrFail($user->id);

        return $user->hasPermission('laralum::users.update') || $user->superAdmin();
    }
public function update($user, User $userToManage)
    {
        if ($userToManage->id == $user->id || $userToManage->superAdmin()) {
            return false;
        }

        $user = User::findOrFail($user->id);

        return $user->hasPermission('laralum::users.update') || $user->superAdmin();
    }
public function update ( $ user , User $ userToManage ) { if ( $ userToManage -> id == $ user -> id || $ userToManage -> superAdmin ( ) ) { return false ; } $ user = User :: findOrFail ( $ user -> id ) ; return $ user -> hasPermission ( 'laralum::users.update' ) || $ user -> superAdmin ( ) ; }
Determine if the current user can update users.

@param mixed $user

@return bool
Determine if the current user can update users .