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
There are a few setup items to do before you can start using Shield in
98
-
your project.
99
-
100
75
1. Copy the **Auth.php**, **AuthGroups.php**, and **AuthToken.php** from **vendor/codeigniter4/shield/src/Config/** into your project's config folder and update the namespace to `Config`. You will also need to have these classes extend the original classes. See the example below. These files contain all the settings, group, and permission information for your application and will need to be modified to meet the needs of your site.
101
76
102
77
```php
@@ -138,25 +113,7 @@ your project.
138
113
139
114
4. **Security Setup** Set `Config\Security::$csrfProtection` to `'session'` for security reasons, if you use Session Authenticator.
140
115
141
-
5. **Migration** Run the migrations.
142
-
143
-
!!! note
144
-
145
-
If you want to customize table names, you must change the table names before running database migrations.
146
-
See [Customizing Table Names](../customization/table_names.md).
147
-
148
-
```console
149
-
php spark migrate --all
150
-
```
151
-
152
-
#### Note: migration error
153
-
154
-
When you run `spark migrate --all`, if you get `Class "SQLite3" not found` error:
155
-
156
-
1. Remove sample migration files in **tests/_support/Database/Migrations/**
157
-
2. Or install `sqlite3` php extension
158
-
159
-
6. Configure **app/Config/Email.php** to allow Shield to send emails.
116
+
5. Configure **app/Config/Email.php** to allow Shield to send emails with the [Email Class](https://codeigniter.com/user_guide/libraries/email.html).
160
117
161
118
```php
162
119
<?php
@@ -180,3 +137,21 @@ your project.
180
137
// ...
181
138
}
182
139
```
140
+
141
+
6. **Migration** Run the migrations.
142
+
143
+
!!! note
144
+
145
+
If you want to customize table names, you must change the table names before running database migrations.
146
+
See [Customizing Table Names](../customization/table_names.md).
147
+
148
+
```console
149
+
php spark migrate --all
150
+
```
151
+
152
+
#### Note: migration error
153
+
154
+
When you run `spark migrate --all`, if you get `Class "SQLite3" not found` error:
155
+
156
+
1. Remove sample migration files in **tests/_support/Database/Migrations/**
0 commit comments