public function scopeUnranked($query) { return $query->where('approved', '=', self::STATES['pending']); }