Skip to content

Commit

Permalink
Edit docs for storing users in a database to place instructions in co…
Browse files Browse the repository at this point in the history
…rrect order (statamic#1371)

* Update storing-users-in-a-database.md

Moving the tip about composer require doctrine/dbal to a position in the docs where it is most useful. Otherwise the reader works down all the instructions, and then finds this when it's too late!

* Remove the `doctine/dbal` suggestion

* Tweak optional

---------

Co-authored-by: Duncan McClean <[email protected]>
  • Loading branch information
steveparks and duncanmcclean authored Jun 17, 2024
1 parent 35b5064 commit e456dc1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions content/collections/tips/storing-users-in-a-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,13 @@ You will need to run migrations to prepare your database for Statamic's user, pa
php please auth:migration
php artisan migrate
```
3. (optional) If you are using the Statamic forgot password form, add the following method to your User model
4. Optional: If you are using the Statamic forgot password form, add the following method to your User model
```php
public function sendPasswordResetNotification($token)
{
$this->notify(new \Statamic\Notifications\PasswordReset($token));
}
```

:::tip
When using `sqlite` or `mysql` as your database driver, make sure to `composer require doctrine/dbal`. We change the `users` table in our auth migrations and therefore [require](https://laravel.com/docs/master/migrations#modifying-columns) the `doctrine/dbal` to run the migrations without errors.
:::


This assumes you are happy to use our opinionated setup. If you need something more custom you can [create your own user driver](/tips/storing-users-somewhere-custom).

0 comments on commit e456dc1

Please sign in to comment.