Skip to content

Commit

Permalink
#added-ignore-scopes-in-connectives-func
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehmet Akif TEZCAN committed Feb 28, 2024
1 parent a6dbf4a commit 2bb3600
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Traits/Connective.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ public function inverseConnectives(string|array|null $connectionTypes = null, st

if ($ignoreScopes && is_array($ignoreScopes)){
$fromModelInstance = $fromModelType::withoutGlobalScopes($ignoreScopes)->find($fromModelId);
$collection->push($fromModelInstance);
}else{
$fromModelInstance = $fromModelType::find($fromModelId);
}

if ($fromModelInstance != null){
$collection->push($fromModelInstance);
}

Expand Down

0 comments on commit 2bb3600

Please sign in to comment.