Skip to content

Commit 6aa6828

Browse files
committed
Fixed ownedby seeder to ignore non-governor policies.
1 parent a80f304 commit 6aa6828

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

database/seeders/OwnedBySeeder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public function run()
1717
{
1818
$this->getPolicies()
1919
->each(function ($policy) {
20+
if (! is_subclass_of($policy, BasePolicy::class)) {
21+
return collect();
22+
}
23+
2024
$this->createGovernorOwnedByFieldsByPolicy(new $policy);
2125
});
2226
}

0 commit comments

Comments
 (0)