I am using Laravel 5.5 and Php 7.0 . I want to attach a function to clear all existing cookies set by my site before attempting login.The code of LoginController unchanged is
use Johnson\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
public function username()
{
return 'username';
}
}
?>
How can I remove all cookies before showing login page if not logged in?I am using default laravel login page.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2wJGYqJ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire