From 8296f30c829b9cbf4e93b9aebb0c35c5b696569e Mon Sep 17 00:00:00 2001 From: Phill Sparks Date: Tue, 27 Nov 2012 12:33:01 +0000 Subject: [PATCH] Update laravel/database/eloquent/model.php Make query() available publicly via object and statically. --- laravel/database/eloquent/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index b450d21a..2efb964b 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -468,7 +468,7 @@ public function touch() * * @return Query */ - protected function query() + protected function _query() { return new Query($this); } @@ -762,7 +762,7 @@ public function __call($method, $parameters) 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 // keep underscored methods of those methods and intercept calls to them