Skip to content

Commit 21a9dc4

Browse files
committed
visibleInShow closure
1 parent 6628468 commit 21a9dc4

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
@@ -102,8 +102,10 @@ public function show($id)
102102
}
103103

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

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

0 commit comments

Comments
 (0)