Ejemplo n.º 1
0
 /**
  * Begin a fluent query against a database table.
  *
  * @param  string  $table
  * @return \Nova\Database\Query\Builder
  */
 public function table($table)
 {
     $processor = $this->getPostProcessor();
     $query = new Query\Builder($this, $this->getQueryGrammar(), $processor);
     return $query->from($table);
 }
Ejemplo n.º 2
0
 /**
  * Set a model instance for the model being queried.
  *
  * @param  \Nova\Database\ORM\Model  $model
  * @return \Nova\Database\ORM\Builder
  */
 public function setModel(Model $model)
 {
     $this->model = $model;
     $this->query->from($model->getTable());
     return $this;
 }