src/EntityRelationsAchievements.php
public function syncAchievements()
    {
        /** @var Collection $locked */
        $locked = AchievementDetails::getUnsyncedByAchiever($this);
        $self = $this;
        $locked->each(function ($el) use ($self) {
            $progress = new AchievementProgress();
            $progress->details()->associate($el);
            $progress->achiever()->associate($this);
            $progress->points = 0;
            $progress->save();
        });
    }
public function syncAchievements()
    {
        /** @var Collection $locked */
        $locked = AchievementDetails::getUnsyncedByAchiever($this);
        $self = $this;
        $locked->each(function ($el) use ($self) {
            $progress = new AchievementProgress();
            $progress->details()->associate($el);
            $progress->achiever()->associate($this);
            $progress->points = 0;
            $progress->save();
        });
    }
public function syncAchievements ( ) { /** @var Collection $locked */ $ locked = AchievementDetails :: getUnsyncedByAchiever ( $ this ) ; $ self = $ this ; $ locked -> each ( function ( $ el ) use ( $ self ) { $ progress = new AchievementProgress ( ) ; $ progress -> details ( ) -> associate ( $ el ) ; $ progress -> achiever ( ) -> associate ( $ this ) ; $ progress -> points = 0 ; $ progress -> save ( ) ; } ) ; }
Syncs achievement data.
Syncs achievement data .