src/Model/AchievementDetails.php
public static function getUnsyncedByAchiever($achiever)
    {
        $className = (new static)->getAchieverClassName($achiever);

        $achievements = AchievementProgress::where('achiever_type', $className)
                                           ->where('achiever_id', $achiever->id)->get();
        $synced_ids = $achievements->map(function ($el) {
            return $el->achievement_id;
        })->toArray();

        return self::whereNotIn('id', $synced_ids);
    }
public static function getUnsyncedByAchiever($achiever)
    {
        $className = (new static)->getAchieverClassName($achiever);

        $achievements = AchievementProgress::where('achiever_type', $className)
                                           ->where('achiever_id', $achiever->id)->get();
        $synced_ids = $achievements->map(function ($el) {
            return $el->achievement_id;
        })->toArray();

        return self::whereNotIn('id', $synced_ids);
    }
public static function getUnsyncedByAchiever ( $ achiever ) { $ className = ( new static ) -> getAchieverClassName ( $ achiever ) ; $ achievements = AchievementProgress :: where ( 'achiever_type' , $ className ) -> where ( 'achiever_id' , $ achiever -> id ) -> get ( ) ; $ synced_ids = $ achievements -> map ( function ( $ el ) { return $ el -> achievement_id ; } ) -> toArray ( ) ; return self :: whereNotIn ( 'id' , $ synced_ids ) ; }
Gets all AchievementDetails that have no correspondence on the Progress table.

@param \Illuminate\Database\Eloquent\Model $achiever
Gets all AchievementDetails that have no correspondence on the Progress table .