I ran the make: auth of laravel 5.3 but when I am creating new users I lose my session and the new user is logged in. Does anyone know how I can create a new user and stay signed in with my account?
I ran the make: auth of laravel 5.3 but when I am creating new users I lose my session and the new user is logged in. Does anyone know how I can create a new user and stay signed in with my account?
You can disable this option within the framework's default log file:
MeuProjeto\vendor\laravel\framework\src\Illuminate\Foundation\Auth\RegistersUsers.php
This is the method that performs the registration:
public function register(Request $request)
{
$this->validator($request->all())->validate();
event(new Registered($user = $this->create($request->all())));
// Esta linha loga no usuário recém criado
// Comente-a para não realizar o login
$this->guard()->login($user);
return $this->registered($request, $user)
?: redirect($this->redirectPath());
}