In Laravel when i logout and click on back button it goes back to page from where i logout.
I think its issue of flush session data so i have used below method to flush session data and redirect to login page.
I have removed this line Artisan::call('cache:clear'); for clear cache is well.
public function getLogout()
{
$this->auth->logout();
Artisan::call('cache:clear');
Session::flush();
return redirect('login');
}
this are libraries i have also used :
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Redirect;
use Lang;
use App\User;
use Auth;
use Session;
I think session is not clearing data or redirect issue.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire