Laravel disable auto login after registration




In your RegisterController, add the following method to override the default behavior:
public function register(Request $request) { $this->validator($request->all())->validate(); event(new Registered($user = $this->create($request->all()))); // $this->guard()->login($user); return $this->registered($request, $user) ?: redirect($this->redirectPath()); }
You need to be sure to add these use statements at the top of your controller file:
use Illuminate\Http\Request; use Illuminate\Auth\Events\Registered;

Popular posts from this blog

Ajax Toggle(on/off) on-click Update

Yii Framework In Update Time View Image In Form