/** * Find a model by its primary key. * * @param array $ids * @param array $columns * * @return \Illuminate\Database\Eloquent\Collection */ public function findMany($ids, $columns = ['*']) { if (empty($ids)) { return $this->model->newCollection(); } return $this->model->newCollection(Cache::tags($this->model->getTable())->rememberMany($ids, $this->model->cacheExpiry, function ($ids) use($columns) { return parent::findMany($ids, $columns)->all(); })); }
/** * Find a model by its primary key. * * @param array $ids * @param array $columns * @return \Illuminate\Database\Eloquent\Collection * @static */ public static function findMany($ids, $columns = array()) { return \Illuminate\Database\Eloquent\Builder::findMany($ids, $columns); }
/** * @param Builder $builder * @param Collection $filters * @return EloquentCollection */ protected function findMany(Builder $builder, Collection $filters) { $ids = $filters->get($this->getFindManyKey()); return $builder->findMany($this->normalizeIds($ids)); }
/** * Find a model by its primary key. * * @param array $ids * @param array $columns * @return \Illuminate\Database\Eloquent\Collection */ public function findMany($ids, $columns = ['*']) { $results = $this->model->findMany($ids, $columns); $this->reset(); return $this->hookFindMany($results); }