Commit 8296f30c authored by Phill Sparks's avatar Phill Sparks

Update laravel/database/eloquent/model.php

Make query() available publicly via object and statically.
parent d1efd44c
...@@ -468,7 +468,7 @@ abstract class Model { ...@@ -468,7 +468,7 @@ abstract class Model {
* *
* @return Query * @return Query
*/ */
protected function query() protected function _query()
{ {
return new Query($this); return new Query($this);
} }
...@@ -762,7 +762,7 @@ abstract class Model { ...@@ -762,7 +762,7 @@ abstract class Model {
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment