whereEmail($request->input('email')) ->first(); if (!$user) { return back()->withErrors([ 'general' => 'اطلاعات کاربر اشتباه است.' ]); } if (!Hash::check($request->input('password'), $user->password)){ return back()->withErrors([ 'general' => 'اطلاعات کاربر اشتباه است.' ]); } Auth::login($user); return redirect()->route('index'); } }