Skip to content

Commit 29cd65b

Browse files
committed
1 parent 648191b commit 29cd65b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Form/Field/MultipleSelect.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ protected function getOtherKey()
4646
*/
4747
public function fill($data)
4848
{
49-
$relations = Arr::get($data, $this->form->shouldSnakeAttributes() ? Str::snake($this->column) : $this->column);
49+
if ($this->form && $this->form->shouldSnakeAttributes()) {
50+
$key = Str::snake($this->column);
51+
} else {
52+
$key = $this->column;
53+
}
54+
55+
$relations = Arr::get($data, $key);
5056

5157
if (is_string($relations)) {
5258
$this->value = explode(',', $relations);

0 commit comments

Comments
 (0)