Skip to content

Commit 0e2dbfd

Browse files
authored
Merge pull request #3926 from Laravel-Backpack/autoset-respect-previously-added-columns
fix AutoSet never taking into account previously added columns
2 parents 0215a39 + bb3e40e commit 0e2dbfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/Library/CrudPanel/Traits/AutoSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function setFromDb()
3232
$this->addField($new_field);
3333
}
3434

35-
if (! in_array($field, $this->model->getHidden()) && ! in_array($field, $this->columns())) {
35+
if (! in_array($field, $this->model->getHidden()) && ! isset($this->columns()[$field])) {
3636
$this->addColumn([
3737
'name' => $field,
3838
'label' => $this->makeLabel($field),

0 commit comments

Comments
 (0)