當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Builder::findMany方法代碼示例

本文整理匯總了PHP中Illuminate\Database\Eloquent\Builder::findMany方法的典型用法代碼示例。如果您正苦於以下問題:PHP Builder::findMany方法的具體用法?PHP Builder::findMany怎麽用?PHP Builder::findMany使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Database\Eloquent\Builder的用法示例。


在下文中一共展示了Builder::findMany方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: findMany

 /**
  * 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();
     }));
 }
開發者ID:tshafer,項目名稱:laravel-traits,代碼行數:17,代碼來源:Builder.php

示例2: findMany

 /**
  * 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);
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:12,代碼來源:_ide_helper.php

示例3: findMany

 /**
  * @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));
 }
開發者ID:cloudcreativity,項目名稱:laravel-json-api,代碼行數:10,代碼來源:AbstractSearch.php

示例4: findMany

 /**
  * 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);
 }
開發者ID:propaganistas,項目名稱:laravel-repository,代碼行數:13,代碼來源:Repository.php


注:本文中的Illuminate\Database\Eloquent\Builder::findMany方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。