jeudi 16 mars 2017

laravel 5.2 custom login

I try to create custom login page but I got an error

Undefined index: password

my controller code

$this->validate($Request, [
        'Email' => 'required',
        'password' => 'required',
        ]);
         $email    = $Request['Email'];
         $password     =  md5($Request['password']);
         $login    = new login();
         $login    = login::where('Email', $email);
         if(empty($password))
         {
            return('404');
         }
         if(Auth::attempt(['Email' => $Request->input('Email'), 'Password' =>$password]))
         {
            return ('ok');
         }
         return ('no');

any one help my to create custom login



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire