Достижение как только пользователь зарегистрируется, автоматически войдите в систему этого пользователя.
Ошибка
< blockquote>
"Ошибка типа: аргумент 1, переданный в Illuminate\Auth\SessionGuard::login(), должен реализовывать интерфейс Illuminate\Contracts\Auth\Authenticatable, указана строка, вызываемая в Server/vendor/laravel/framework /src/Illuminate/Auth/AuthManager.php в строке 294 ◀"
Код: Выделить всё
if ($validator->fails()) {
// $messages = $validator->messages();
return Redirect::to('register')
->withErrors($validator)
->withInput();
} else {
$email = Input::get('email');
$user = new user;
$user->name = Input::get('name');
$user->email = Input::get('email');
$user->password = Hash::make(Input::get('password'));
$user->save();
// $userMail = $user->find($email);
$userMail = User::where('email','=',$email)->first();
Auth::login($userMail->email, TRUE);
Подробнее здесь: https://stackoverflow.com/questions/463 ... n-function
Мобильная версия