protected function isDuplicateUserAppRole($uar)
    {
        $userId = $uar['user_id'];
        $appId = $uar['app_id'];
        $roleId = $uar['role_id'];

        return UserAppRole::whereRaw(
            "user_id = '$userId' AND 
            role_id = '$roleId' AND 
            app_id = '$appId'"
        )->exists();
    }