From c9c7151e328a9f5e5b16af720becdc6ce7b30904 Mon Sep 17 00:00:00 2001 From: assada Date: Fri, 6 Mar 2020 14:26:53 +0200 Subject: [PATCH] Add notInProgressAchievements method --- src/EntityRelationsAchievements.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/EntityRelationsAchievements.php b/src/EntityRelationsAchievements.php index 726eca5..bca9996 100644 --- a/src/EntityRelationsAchievements.php +++ b/src/EntityRelationsAchievements.php @@ -61,6 +61,16 @@ public function inProgressAchievements(): Collection return $this->achievements()->whereNull('unlocked_at')->where('points', '>', 0)->get(); } + /** + * Get the entity's achievements not in progress. + * + * @return Collection + */ + public function notInProgressAchievements(): Collection + { + return $this->achievements()->whereNull('unlocked_at')->where('points', '=', 0)->get(); + } + /** * Get the entity's unlocked achievements. *