Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update HandlesBoundValues.php
  • Loading branch information
pascalbaljet committed Dec 15, 2020
commit 6ccbe4a20d290544ed20b2c1d081fc33bea038a1
8 changes: 3 additions & 5 deletions src/Components/HandlesBoundValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ private function getBoundValue($bind, string $name)

$bind = $bind ?: $this->getBoundTarget();

if ($this->manyRelation) {
return $this->getAttachedKeysFromRelation($bind, $name);
}

return data_get($bind, $name);
return $this->manyRelation
? $this->getAttachedKeysFromRelation($bind, $name)
: data_get($bind, $name);
}

private function getAttachedKeysFromRelation($bind, string $name)
Expand Down