Skip to content

Commit af9df72

Browse files
committed
docs: update docs
1 parent 57986ba commit af9df72

1 file changed

Lines changed: 23 additions & 48 deletions

File tree

docs/getting_started/install.md

Lines changed: 23 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ Require it with an explicit version constraint allowing its desired stability.
5454

5555
## Initial Setup
5656

57+
There are a few setup items to do before you can start using Shield in
58+
your project.
59+
5760
### Command Setup
5861

59-
1. Run the following command. This command handles steps 1-5 of *Manual Setup* and runs the migrations.
62+
1. Run the following command. This command handles steps 1-6 of *Manual Setup*.
6063

6164
```console
6265
php spark shield:setup
@@ -67,36 +70,8 @@ Require it with an explicit version constraint allowing its desired stability.
6770
If you want to customize table names, you must change the table names before running database migrations.
6871
See [Customizing Table Names](../customization/table_names.md).
6972

70-
2. Configure **app/Config/Email.php** to allow Shield to send emails with the [Email Class](https://codeigniter.com/user_guide/libraries/email.html).
71-
72-
```php
73-
<?php
74-
75-
namespace Config;
76-
77-
use CodeIgniter\Config\BaseConfig;
78-
79-
class Email extends BaseConfig
80-
{
81-
/**
82-
* @var string
83-
*/
84-
public $fromEmail = '[email protected]';
85-
86-
/**
87-
* @var string
88-
*/
89-
public $fromName = 'your name';
90-
91-
// ...
92-
}
93-
```
94-
9573
### Manual Setup
9674

97-
There are a few setup items to do before you can start using Shield in
98-
your project.
99-
10075
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.
10176

10277
```php
@@ -138,25 +113,7 @@ your project.
138113

139114
4. **Security Setup** Set `Config\Security::$csrfProtection` to `'session'` for security reasons, if you use Session Authenticator.
140115

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).
160117

161118
```php
162119
<?php
@@ -180,3 +137,21 @@ your project.
180137
// ...
181138
}
182139
```
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/**
157+
2. Or install `sqlite3` php extension

0 commit comments

Comments
 (0)