Skip to content

Commit c20cc9f

Browse files
authored
Merge pull request #237 from nikosv/main
Fix for Select and model's relationships
2 parents 2b3d8e1 + fef115b commit c20cc9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Elements/Select.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ protected function hasSelection()
126126

127127
protected function applyValueToOptions()
128128
{
129-
$value = Collection::make($this->value);
129+
$value = $this->value instanceof \Illuminate\Support\Collection
130+
? $this->value
131+
: Collection::make($this->value);
130132

131133
if (! $this->hasAttribute('multiple')) {
132134
$value = $value->take(1);

0 commit comments

Comments
 (0)