Commit ddb5acc254b0881b66f16cbbf18c1a291e27e36c

Authored by Андрей Ларионов
1 parent ac8b91cfd9

Валидация логина и пароля

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

app/Http/Controllers/MainController.php
... ... @@ -322,7 +322,8 @@ class MainController extends Controller
322 322  
323 323  
324 324 if ($validator->fails()) {
325   - return redirect()->route('index')->with('Error', "Email или пароль невалидный");
  325 + return json_encode(Array("ERROR" => "Email или пароль невалидный!"));
  326 + //redirect()->route('index')->with('Error', "Email или пароль невалидный");
326 327 } else {
327 328 $credentials = $request->only('email', 'password');
328 329