Fixing Eloquent constructor bug.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
Taylor Otwell
2012-03-29 22:04:04 -05:00
parent 15982efd11
commit b5dd77d387
3 changed files with 15 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ class Query {
{
$this->model = ($model instanceof Model) ? $model : new $model;
$this->table = $this->query();
$this->table = $this->table();
}
/**
@@ -245,7 +245,7 @@ class Query {
*
* @return Query
*/
protected function query()
protected function table()
{
return $this->connection()->table($this->model->table());
}