Laravel 5.3 - How to keep the session message until the users logs out
问题 I am sending a welcome message to user after registration. I have modified the trait method in my controller like so: public function register(Request $request) { $this->validator($request->all())->validate(); event(new Registered($user = $this->create($request->all()))); $this->guard()->login($user); Session::set('message','messages.welcome'); return redirect($this->redirectPath())->with('message', 'messages.welcome'); } I have also tried $request->session()->put('message','messages.welcome'