September 17, 2015 14:32
In Laravel, redirecting the user to one URL after logging in and another after registering (such as a welcome page) is very simple.
First, inside your AuthController
, set the post-login URL as the default:
protected $redirectTo = '/url-after-login';
and then inside the create function, override it to the post-registration URL
protected function create(array $data)
{
$this->redirectTo = '/url-after-register';
return User::create([...]);
}