Update laravel/database/eloquent/model.php

Make query() available publicly via object and statically.
This commit is contained in:
Phill Sparks 2012-11-27 12:33:01 +00:00
parent d1efd44c7c
commit 8296f30c82
1 changed files with 2 additions and 2 deletions

View File

@ -468,7 +468,7 @@ public function touch()
* *
* @return Query * @return Query
*/ */
protected function query() protected function _query()
{ {
return new Query($this); return new Query($this);
} }
@ -762,7 +762,7 @@ public function __call($method, $parameters)
return static::$$method; return static::$$method;
} }
$underscored = array('with', 'find'); $underscored = array('with', 'find', 'query');
// Some methods need to be accessed both staticly and non-staticly so we'll // Some methods need to be accessed both staticly and non-staticly so we'll
// keep underscored methods of those methods and intercept calls to them // keep underscored methods of those methods and intercept calls to them