Пример #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);
 }