- 16 Oct, 2012 1 commit
-
-
Blaine Schmeisser authored
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>
-
- 11 Oct, 2012 1 commit
-
-
Shawn McCool authored
-
- 07 Oct, 2012 5 commits
-
-
Taylor Otwell authored
Added a getInner method for retrieving the inner exception
-
Taylor Otwell authored
-
Taylor Otwell authored
Fixing has_one iterations
-
Vinícius Fragoso authored
-
Dejan Geci authored
Signed-off-by: Dejan Geci <dejan.geci@gmail.com>
-
- 06 Oct, 2012 3 commits
-
-
Taylor Otwell authored
Fixed wrong return type in phpdoc
-
Taylor Otwell authored
Update laravel/helpers.php
-
Taylor Otwell authored
Huge performance increase on Eloquents relationships
-
- 05 Oct, 2012 1 commit
-
-
Vinícius Fragoso authored
-
- 03 Oct, 2012 2 commits
-
-
tillsanders authored
The e-helper and the __-Helper used the core-classes. So if I would like to override them, the helpers would still use the core-classes. See this thread for further explanation: http://forums.laravel.com/viewtopic.php?id=2656
-
Taylor Otwell authored
Fixes XSS vulnerability in Profiler
-
- 02 Oct, 2012 1 commit
-
-
Nathan Malcolm authored
-
- 28 Sep, 2012 1 commit
-
-
Daniel Bøndergaard authored
Signed-off-by: Daniel Bøndergaard <db@helmstmt.com>
-
- 27 Sep, 2012 5 commits
-
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
- 26 Sep, 2012 15 commits
-
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
Performance enhancement for Str Class (see pull request #1180)
-
Taylor Otwell authored
Fixed a problem with `Eloquent::get_dirty`
-
Taylor Otwell authored
Fixes language URI routing issue
-
Taylor Otwell authored
Correct broken links in docs
-
Taylor Otwell authored
Fix a tiny typo
-
Taylor Otwell authored
Auth token now nulled on logout
-
Taylor Otwell authored
[#1261] get_key now pulls from $original instead
-
Taylor Otwell authored
-
Taylor Otwell authored
-
- 25 Sep, 2012 5 commits
-
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-
Taylor Otwell authored
-