public function enter(Request $request)
{
$login = $request->input('login');
$password = md5($request->input('password'));
$language = $request->input('language');
$user = User::where('login', $login)->andWhere('password', $password)->first();
if ($user) {
/* Create a cookie. */
return redirect('backend.dashboard');
} else {
$error = 'Not correct login or password.';
$errors = [
'errors' => $error
];
return redirect('backend')->with($errors);
}
}
Find more questions by tags Laravel
And where here you specify the table you use? I, for example, the table is called "backend_users". - Arthur_McCullough70 commented on July 8th 19 at 17:19