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();
    }
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();
    }
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 ( ) ; }
Checks for duplicate user_to_app_to_role relation.

@param $uar

@return bool
Checks for duplicate user_to_app_to_role relation .