I am trying to echo out the value of a session that I set in Controller
public function changeLanguage(Request $request){
if($request->ajax()){
$request->session()->put('locale',$request->locale);
$request->session()->flash('alert-success',('app.Locale_Change_Success'));
}
}
the Values of $request->local
that submits by ajax are dr and en.
Now I want to the value of dr and en in blade, the code looks like this
@if(Session::has('locale','en'))
<link rel="stylesheet" type="text/css" href="css/en.css">
@endif
@if(Session::has('locale','dr'))
<link rel="stylesheet" type="text/css" href="css/dr.css">
@endif