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


PHP Builder::addNestedWhereQuery方法代碼示例

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


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

示例1: where

 /**
  * Add a basic where clause to the query.
  *
  * @param  string  $column
  * @param  string  $operator
  * @param  mixed   $value
  * @param  string  $boolean
  * @return \Illuminate\Database\Eloquent\Builder|static
  */
 public function where($column, $operator = null, $value = null, $boolean = 'and')
 {
     if ($column instanceof Closure) {
         $query = $this->model->newQuery();
         call_user_func($column, $query);
         $this->query->addNestedWhereQuery($query->getQuery(), $boolean);
     } else {
         $this->query->where($column, $operator, $value, $boolean);
     }
     return $this;
 }
開發者ID:aysenli,項目名稱:laravel-admin-1,代碼行數:20,代碼來源:Builder.php

示例2: where

 /**
  * Add a basic where clause to the query.
  *
  * @param  string  $column
  * @param  string  $operator
  * @param  mixed   $value
  * @param  string  $boolean
  * @return $this
  */
 public function where($column, $operator = null, $value = null, $boolean = 'and')
 {
     if ($column instanceof Closure) {
         $query = $this->model->newQueryWithoutScopes();
         call_user_func($column, $query);
         $this->query->addNestedWhereQuery($query->getQuery(), $boolean);
     } else {
         call_user_func_array(array($this->query, 'where'), func_get_args());
     }
     return $this;
 }
開發者ID:visualturk,項目名稱:framework,代碼行數:20,代碼來源:Builder.php

示例3: addNestedWhereQuery

 /**
  * Add another query builder as a nested where to the query builder.
  *
  * @param \Illuminate\Database\Query\Builder|static $query
  * @param string $boolean
  * @return $this 
  * @static 
  */
 public static function addNestedWhereQuery($query, $boolean = 'and')
 {
     return \Illuminate\Database\Query\Builder::addNestedWhereQuery($query, $boolean);
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:12,代碼來源:_ide_helper.php


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