/** * Check whether the user can have the badge * * @param Users $user * @return boolean */ public function canHave(Users $user) { return $user->countReplies() >= 10; }
/** * Check whether the user can have the badge * * @param Users $user * @return boolean */ public function canHave(Users $user) { return $user->countReplies('accepted = "Y"') >= 15; }