diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 34c5250..72348bb 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -322,7 +322,8 @@ class MainController extends Controller if ($validator->fails()) { - return redirect()->route('index')->with('Error', "Email или пароль невалидный"); + return json_encode(Array("ERROR" => "Email или пароль невалидный!")); + //redirect()->route('index')->with('Error', "Email или пароль невалидный"); } else { $credentials = $request->only('email', 'password');