I'm working on a project with laravel, in it I created a session variable that takes a parameter from the url as follows:
if(!empty(Input::get('lang'))){
$lang = Input::get('lang');
Session::put('lang', $lang);
} else {
$lang = "es";
Session::put('lang', $lang);
}
if(Session::get('lang') == 'pt-br'){
App::setLocale("pt-br");
}
That way the session is only working on this page, when I try to use it on another page I can not, could someone help me?