スタックトレース:D:\ xampp \ htdocs \ guestlara \ app \ controllers \ loginController内の 'シンボニー\コンポーネント\デバッグ\例外\ FatalErrorException'というメッセージが '構文エラー、予期しない' .PHP: -ラーバル検証構文エラー
return Redirect::to('/') ->withErrors($validator); log::error($validator); // Here } else {
小変更
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言語での構文エラーです。ララヴェルやその検証に共通するものはありません。 – Rolice