Back to Translate Extended Support

maxDubovsky
maxDubovsky

Hi Everybody,

Don't forget to add middleware->web to routes.php for Build 420 otherwise your whole project will set different cookie every time you open a new page. It took us two days to find out this.

Best regards and Merry Christmas

chris10207
chris10207

What is there to do exactly please?

maxDubovsky
maxDubovsky

if(Settings::get('route_prefixing', true)) { Route::group(['prefix' => $locale], function() { Route::any('{slug}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web'); });

    Route::any($locale, 'Cms\Classes\CmsController@run')->middleware('web');

    Event::listen('cms.route', function() use ($locale) {
        Route::group(['prefix' => $locale], function() {
            Route::any('{slug}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web');
        });
    });

    if(Settings::get('homepage_redirect', true)) {
        Route::get('/', function() use ($locale) {
            return redirect($locale);
        });
    }

}

1-3 of 3