Skip to content

Commit 8698b8e

Browse files
authored
Merge pull request #3624 from izica/visible-in-show-closure
visibleInShow closure
2 parents 4b9ab1f + 2d1aee4 commit 8698b8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/Http/Controllers/Operations/ShowOperation.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ public function show($id)
101101
}
102102

103103
// remove columns that have visibleInShow set as false
104-
if (isset($column['visibleInShow']) && $column['visibleInShow'] == false) {
105-
$this->crud->removeColumn($column['key']);
104+
if (isset($column['visibleInShow'])) {
105+
if ((is_callable($column['visibleInShow']) && $column['visibleInShow']($this->data['entry']) === false) || $column['visibleInShow'] === false) {
106+
$this->crud->removeColumn($column['key']);
107+
}
106108
}
107109

108110
// remove the character limit on columns that take it into account

0 commit comments

Comments
 (0)