Skip to content

Commit 6a4d781

Browse files
committed
docs: add Custom Table Names
1 parent 0aa37da commit 6a4d781

1 file changed

Lines changed: 35 additions & 13 deletions

File tree

docs/customization.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
11
# Customizing Shield
22

3-
- [Customizing Shield](#customizing-shield)
4-
- [Route Configuration](#route-configuration)
5-
- [Custom Redirect URLs](#custom-redirect-urls)
6-
- [Customize Login Redirect](#customize-login-redirect)
7-
- [Customize Register Redirect](#customize-register-redirect)
8-
- [Customize Logout Redirect](#customize-logout-redirect)
9-
- [Extending the Controllers](#extending-the-controllers)
10-
- [Integrating Custom View Libraries](#integrating-custom-view-libraries)
11-
- [Custom Validation Rules](#custom-validation-rules)
12-
- [Registration](#registration)
13-
- [Login](#login)
14-
- [Custom User Provider](#custom-user-provider)
15-
- [Custom Login Identifier](#custom-login-identifier)
3+
- [Customizing Shield](#customizing-shield)
4+
- [Custom Table Names](#custom-table-names)
5+
- [Route Configuration](#route-configuration)
6+
- [Custom Redirect URLs](#custom-redirect-urls)
7+
- [Customize Login Redirect](#customize-login-redirect)
8+
- [Customize Register Redirect](#customize-register-redirect)
9+
- [Customize Logout Redirect](#customize-logout-redirect)
10+
- [Extending the Controllers](#extending-the-controllers)
11+
- [Integrating Custom View Libraries](#integrating-custom-view-libraries)
12+
- [Custom Validation Rules](#custom-validation-rules)
13+
- [Registration](#registration)
14+
- [Login](#login)
15+
- [Custom User Provider](#custom-user-provider)
16+
- [Custom Login Identifier](#custom-login-identifier)
17+
18+
## Custom Table Names
19+
20+
If you want to change the default table names, you can change the table names
21+
in **app/Config/Auth.php**.
22+
23+
```php
24+
public array $tables = [
25+
'users' => 'users',
26+
'identities' => 'auth_identities',
27+
'logins' => 'auth_logins',
28+
'token_logins' => 'auth_token_logins',
29+
'remember_tokens' => 'auth_remember_tokens',
30+
'groups_users' => 'auth_groups_users',
31+
'permissions_users' => 'auth_permissions_users',
32+
];
33+
```
34+
35+
Set the table names that you want in the array values.
36+
37+
> **Note** You must change the table names before running database migrations.
1638
1739
## Route Configuration
1840

0 commit comments

Comments
 (0)