Q:

Displaying message after successful registration

I don't want to login users after registration but redirect them login page. So far i am successful overriding Register() in RegisterController.
public function Register(Request $request)
    {
        $validator = $this->validator($request->all());

        if ($validator->fails()) {
            $this->throwValidationException(
                $request, $validator
        );
        }

        return redirect('/login')->with('message','Successfully Registered');
    }

But the success message is not appearing. And when i return directly to view:
return view('auth.login')->with('message','Successfully registered');

The messsage is displayed correctly in login page but the url goes to /register this means after i try to login, it goes to registration form instead? What is the actual solution to do this?

A:

Flash to the session:
$request->session()->flash('message', 'content');

Then check if the session exists with: 
session()->has('message')

and if it does display it with session()->get('message')

