We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69565f7 commit 0838121Copy full SHA for 0838121
src/Traits/GovernorOwnedByField.php
@@ -33,7 +33,12 @@ protected function createGovernorOwnedByFieldsByPolicy(BasePolicy $policy): bool
33
34
protected function createGovernorOwnedByFields(Model $model): bool
35
{
36
- if (! in_array("GeneaLabs\\LaravelGovernor\\Traits\\Governable", class_uses_recursive($model))) {
+ $class = new ReflectionClass($model);
37
+
38
+ if (
39
+ ! in_array("GeneaLabs\\LaravelGovernor\\Traits\\Governable", class_uses_recursive($model))
40
+ || $class->isAbstract()
41
+ ) {
42
return false;
43
}
44
0 commit comments