vendredi 21 décembre 2018

Laravel 5.7 auth can't get success

I tried to make auth API, I am success registed. Than Signin can't success. Please help me ,thanks.

public function login(Request $request)
{
    try
    {
        if (!$request->has('Account') 
        || !$request->has('Password'))
        {
         throw new Exception('Parameter missing');
        }

         $checkUser = DB::table('Users')->where('Account',$request->Account)->first();
        if(empty($checkUser))
        {
            throw new Exception('No Data');
        }
        $data = ([
            'Account' => $request->Account,
            'Password' => $request->Password,
        ]);  

        if(!Auth::attempt($data))
        throw new Exception('Verification error'); 

this db info. enter image description here



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2EDUQFJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire