Skip to content

Commit 090d2e5

Browse files
committed
Added governing classes to add owned by field.
1 parent 0838121 commit 090d2e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Traits/GovernorOwnedByField.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ protected function createGovernorOwnedByFields(Model $model): bool
3636
$class = new ReflectionClass($model);
3737

3838
if (
39-
! in_array("GeneaLabs\\LaravelGovernor\\Traits\\Governable", class_uses_recursive($model))
39+
(! in_array("GeneaLabs\\LaravelGovernor\\Traits\\Governable", class_uses_recursive($model))
40+
&& ! in_array("GeneaLabs\\LaravelGovernor\\Traits\\Governing", class_uses_recursive($model)))
4041
|| $class->isAbstract()
4142
) {
4243
return false;

0 commit comments

Comments
 (0)