How can I redirect to specific path after registration in Laravel?. I want to redirect page on id after registration. please help me.
Thank You, in advanced..
How can I redirect to specific path after registration in Laravel?. I want to redirect page on id after registration. please help me.
Thank You, in advanced..
If you want to run custom logic after user registers, you'll need to implement registered() method in the controller that registers users:
protected function registered(Request $request, $user)
{
$path = ...; //determine path to redirect to
return redirect($path);
}
I found the answers, Just add $this->redirectTo = ' / ' in Auth/RegisterController.php
Auth/RegisterController.php
Like This:
protected function create(array $data)
{
$user = User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
$this->redirectTo = '/';
return $user;
}