Permalink
Browse files

Update PermissionSeed.php

Reset cached roles and permissions and clear application cache every time the seed runs.
  • Loading branch information...
pcrubianoa committed Dec 10, 2018
1 parent f44f9c9 commit aba861919fb933fd76d1a442c4399763d6a14bc6
Showing with 3 additions and 0 deletions.
  1. +3 −0 database/seeds/PermissionSeed.php
@@ -12,6 +12,9 @@ class PermissionSeed extends Seeder
*/
public function run()
{
Artisan::call('cache:clear');
app()[\Spatie\Permission\PermissionRegistrar::class]->forgetCachedPermissions();
Permission::create(['name' => 'users_manage']);
}
}

0 comments on commit aba8619

Please sign in to comment.