laravel/laravel — pull request #681 by bencorlett (2012-05-17 01:50:53+00:00)
Title: Added Output Buffering

Hi,

So currently, if I have something like this:

Route::get('/', function()
{
echo 'First';

return Redirect::to('second');
});

Route::get('second', function()
{
return 'Second';
});

The redirect never happens and I just get an empty response. That's because Laravel isn't utilising output buffering. I have added output buffering, which means you can echo anything, set session values or whatever then return an object that's an instance of Laravel\Redirect, and the redirect will happen.

Signed-off-by: Ben Corlett