/** * Counts statements. * @param Builder $builder * @param IndexOptions $opts * @return Int Number of statements in Builder. */ public function count(Builder $builder, IndexOptions $opts) { return $builder->count(['lrs_id' => 1], ['lrs_id' => 1, 'active' => -1, 'voided' => 1]); }
/** * Find a record by an attribute * * @param string $attribute * @param mixed $value * @param array $columns * @return \Jenssegers\Mongodb\Model */ public function findBy($attribute, $value, $columns = ['*']) { $this->applyCriteria(); return $this->builder->where($attribute, '=', $value)->first($columns); }
/** * Counts statements. * @param Builder $builder * @param IndexOptions $opts * @return Int Number of statements in Builder. */ public function count(Builder $builder, IndexOptions $opts) { return $builder->count(); }