Its a common problem . When I logout and then click on the browser back button the browser shows the last loaded page from the website .
I have went through lots of links on stack most of them suggest to clear the headers on logout but it didn't worked .
here is the code that I have tried
Route::get('main/logout',function(){
Session::flush();
Auth::logout();
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.
session()->flash('alert-success', 'Success logged out');
return Redirect::to('/');
});
If any of you have any IDEA please let me know
Thanks
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1XnTXoL
via IFTTT
Aucun commentaire:
Enregistrer un commentaire