Стек след: исключение 'Symfony \ Component \ Debug \ Exception \ FatalErrorException' с сообщением 'ошибка синтаксиса, неожиданный '}'' в D: \ XAMPP \ HTDOCS \ guestlara \ приложение \ Контроллеры \ LoginController .php: 23Laravel синтаксическая ошибка проверки
public function login_user()
{
$rules = array(
'email'=> 'Required|Between:3,64|Email|Unique:users',
'password'=>'Required|AlphaNum|Between:4,8|Confirmed',
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return Redirect::to('/')
->withErrors($validator);
log::error($validator)
}
else
{
// attempt to do the login
if (Auth::attempt($users)) {
return Redirect::to('dashboard');
} else {
return Redirect::to('/');
}
}
}
Это ошибка синтаксиса в языке PHP. Ничего общего ни с Laravel, ни с его валидацией. – Rolice