Skip to content

Commit

Permalink
Update FunctionsTrait.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Gevor701069 authored Nov 22, 2019
1 parent 13c785e commit 5b3a3ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Traits/FunctionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ protected function with($relation, $relOptions, string $type = 'with')
$this->query->{$type}([$relation => function ($query) use ($relOptions) {
foreach ($relOptions as $relOptionName => $relOption) {
$method = $this->clearRelationOption($relOptionName);
$option = [$relOption];
$option = $relOption;
if ($method !== 'whereIn') {
$option = [$relOption];
}

if ($this->isMethodWhere($method)) {
if ( ! $this->isMultiArray($relOption)) {
Expand Down

0 comments on commit 5b3a3ef

Please sign in to comment.