You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: This redirect happens after the specified action is complete. In the case of register or login, it might not happen immediately. For example, if you have any Auth Actions specified, they will be redirected when those actions are completed successfully. If no Auth Actions are specified, they will be redirected immediately after registration or login.
44
44
45
-
### Customize login redirect
45
+
### Customize register redirect
46
46
47
-
You can further customize where a user is redirected to on login with the `loginRedirect` method of the `Auth` config file. This is handy if you want to redirect based on user group or other criteria.
47
+
You can customize where a user is redirected to after registration in the `registerRedirect` method of the `Auth` config file.
48
48
49
49
```php
50
-
public function loginRedirect(): string
50
+
public function registerRedirect(): string
51
51
{
52
-
$url = auth()->user()->inGroup('admin')
53
-
? '/admin'
54
-
: setting('Auth.redirects')['login'];
52
+
$url = setting('Auth.redirects')['register'];
55
53
56
54
return $this->getUrl($url);
57
55
}
58
56
```
59
57
60
-
### Customize register redirect
58
+
### Customize login redirect
61
59
62
-
You can customize where a user is redirected to after registration in the `registerRedirect` method of the `Auth` config file.
60
+
You can further customize where a user is redirected to on login with the `loginRedirect` method of the `Auth` config file. This is handy if you want to redirect based on user group or other criteria.
0 commit comments