- 12 Jan, 2013 1 commit
-
-
Laravel crashes when an OPTIONS request is issued
Pasvaz committed
-
- 16 Oct, 2012 1 commit
-
-
You can edit the response but you can't overwrite it: ~~~ php <?php // https://gist.github.com/3896743 $response = new stdClass(); echo '1): ' . spl_object_hash($response) . PHP_EOL; // 0000000021e89fcd00000000e93b17ba call_user_func_array(function($response) { $response = new stdClass(); echo '2): ' . spl_object_hash($response) . PHP_EOL; // 0000000021e89fcf00000000e93b17ba }, array($response)); echo '3): ' . spl_object_hash($response) . PHP_EOL; // 0000000021e89fcd00000000e93b17ba call_user_func_array(function($response) { $response = new stdClass(); echo '4): ' . spl_object_hash($response) . PHP_EOL; // 0000000021e89fcf00000000e93b17ba // hash descoped and reused }, array(&$response)); echo '5): ' . spl_object_hash($response) . PHP_EOL; // 0000000021e89fcf00000000e93b17ba ~~~ Otherwise you'd make the new response object and overwrite the values one at a time: ~~~ php <?php // https://gist.github.com/3897032 Route::filter('after', function($response) { $params = \Laravel\Request::$route->parameters; // The 'type' is the last param // example: /product/(:num).(:any) $type = array_pop($params); if($type == 'json') { $res = Response::json($response->content->data); foreach($response as $key => &$value) { $response->$key = $res->$key; } } }); ~~~ Signed-off-by: Blaine Schmeisser <blaine.schmeisser@vitals.com>
Blaine Schmeisser committed
-
- 24 Sep, 2012 3 commits
-
-
Mohammad Sadeghi committed
-
Mohammad Sadeghi committed
-
Mohammad Sadeghi committed
-
- 03 Aug, 2012 1 commit
-
-
Sergii Grebeniuk committed
-
- 27 Jul, 2012 2 commits
-
-
Pascal Borreli committed
-
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
Jason Lewis committed
-
- 22 Jul, 2012 1 commit
-
-
Signed-off-by: Josh Miller <josh@joshmmiller.com>
Josh Miller committed
-
- 27 Jun, 2012 1 commit
-
-
Daniel Petrie committed
-
- 24 Jun, 2012 1 commit
-
-
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
Jason Lewis committed
-
- 13 Jun, 2012 1 commit
-
-
Signed-off-by: Chris Berthe <chrisberthe@gmail.com>
Chris Berthe committed
-
- 30 May, 2012 1 commit
-
-
Signed-off-by: Phill Sparks <phill@bulbstudios.com>
Phill Sparks committed
-
- 12 May, 2012 1 commit
-
-
Signed-off-by: Kelly Banman <kelly.banman@gmail.com>
Kelly Banman committed
-
- 10 May, 2012 4 commits
-
-
Taylor Otwell committed
-
Taylor Otwell committed
-
Daniel Petrie committed
-
bundle property wasn't being used, so I made use of it as well as adding the controllers name and action being called.
Daniel Petrie committed
-
- 03 May, 2012 2 commits
-
-
Andrew Ellis committed
-
Taylor Otwell committed
-
- 26 Apr, 2012 1 commit
-
-
Alex Whitman committed
-
- 19 Apr, 2012 1 commit
-
-
Taylor Otwell committed
-
- 16 Apr, 2012 1 commit
-
-
Signed-off-by: Pavel <proger.xp@gmail.com>
Pavel committed
-
- 13 Apr, 2012 1 commit
-
-
Taylor Otwell committed
-
- 21 Mar, 2012 1 commit
-
-
Taylor Otwell committed
-
- 12 Mar, 2012 1 commit
-
-
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell committed
-
- 05 Mar, 2012 1 commit
-
-
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell committed
-
- 28 Feb, 2012 3 commits
-
-
Taylor Otwell committed
-
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell committed -
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell committed
-
- 24 Feb, 2012 1 commit
-
-
Aaron Kuzemchak committed
-
- 23 Feb, 2012 3 commits
-
-
Taylor Otwell committed
-
Taylor Otwell committed
-
Taylor Otwell committed
-
- 22 Feb, 2012 1 commit
-
-
Taylor Otwell committed
-
- 18 Feb, 2012 1 commit
-
-
Taylor Otwell committed
-
- 14 Feb, 2012 1 commit
-
-
Taylor Otwell committed
-
- 13 Feb, 2012 3 commits
-
-
Taylor Otwell committed
-
Taylor Otwell committed
-
Taylor Otwell committed
-