Support the ongoing development of Laravel.io →
Requests Session
Last updated 2 years ago.
0
Route::filter('stylesheetFilter', function($route, $request, $response, $value = null))
{
    $response->header('Content-Type', 'text/css');
}

Route::get('/assets/{theme}/style.css', array('as' => 'stylesheet', 'after' => 'stylesheetFilter' function($theme)
{
    return View::make('custom_styles')->with('store', $theme);
}));

source: http://laravel.com/docs/routing#route-filters

Last updated 2 years ago.
0

You can try to put Session::reflash() in style route closure. It should take old flash data and set is a current one so it should be available in next request.

Last updated 2 years ago.
0

Yu, what @maksymcierzniak said - use Session::reflash() anywhere where you don't want the request to consume the session flash data.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.