Skip to content

Commit

Permalink
Note about database cache store dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte authored Aug 30, 2024
1 parent fe70ca8 commit 4e5c1b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/advanced-usage/seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ You can optionally flush the cache before seeding by using the `SetUp()` method

Or it can be done directly in a seeder class, as shown below.

## Database Cache Store

TIP: If you have `CACHE_STORE=database` set in your `.env`, remember that [you must install Laravel's cache tables via a migration before performing any cache operations](https://laravel.com/docs/cache#prerequisites-database). If you fail to install those migrations, you'll run into errors like `Call to a member function perform() on null` when the cache store attempts to purge or update the cache. This package does strategic cache resets in various places, so may trigger that error if your app's cache dependencies aren't set up.

## Roles/Permissions Seeder

Here is a sample seeder, which first clears the cache, creates permissions and then assigns permissions to roles (the order of these steps is intentional):
Expand Down

0 comments on commit 4e5c1b3

Please sign in to comment.