From e994dffc51ce6162d5a7d64c8fd3223da688574d Mon Sep 17 00:00:00 2001 From: Phill Sparks Date: Wed, 23 Nov 2011 00:47:58 +0000 Subject: [PATCH] Fix Response::of_something() calls --- laravel/response.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/laravel/response.php b/laravel/response.php index 55a51495..9c74f142 100644 --- a/laravel/response.php +++ b/laravel/response.php @@ -316,8 +316,9 @@ public static function __callStatic($method, $parameters) { if (strpos($method, 'of_') === 0) { - return static::with(substr($method, 3), Arr::get($parameters, 0, array())); + return static::of(substr($method, 3), Arr::get($parameters, 0, array())); } + throw new \BadMethodCallException("Method [$method] is not defined on the Response class."); } -} \ No newline at end of file +}