src/Policies/UserPolicy.php
public function view(User $user, User $givenUser)
    {
        if ($user->hasPermissionTo(Permission::USER_READ_ALL)) {
            return true;
        }

        return $user->id === $givenUser->id;
    }
public function view(User $user, User $givenUser)
    {
        if ($user->hasPermissionTo(Permission::USER_READ_ALL)) {
            return true;
        }

        return $user->id === $givenUser->id;
    }
public function view ( User $ user , User $ givenUser ) { if ( $ user -> hasPermissionTo ( Permission :: USER_READ_ALL ) ) { return true ; } return $ user -> id === $ givenUser -> id ; }
Determine whether the user can view the user.

@param  \Unite\UnisysApi\Models\User  $user
@param  \Unite\UnisysApi\Models\User  $givenUser
@return mixed
Determine whether the user can view the user .