Skip to content

Commit 4e5c1b3

Browse files
authored
Note about database cache store dependencies
1 parent fe70ca8 commit 4e5c1b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/advanced-usage/seeding.md

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ You can optionally flush the cache before seeding by using the `SetUp()` method
1818

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

21+
## Database Cache Store
22+
23+
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.
24+
2125
## Roles/Permissions Seeder
2226

2327
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):

0 commit comments

Comments
 (0)