예제 #1
0
 /**
  * @return QueryBuilder
  */
 public function newQuery()
 {
     $query = new QueryBuilder($this->app()['db']);
     $query->setModel($this);
     $query->select('*')->from($this->tableName());
     return $this->_query = $query;
 }
예제 #2
0
 public function scopeTitle(QueryBuilder $query, $name)
 {
     //        var_dump($type);exit;
     return $query->where('title', $name);
 }