Skip to content

Commit 51709c9

Browse files
committed
Add shortcut method to hide column instead of visible(false).
1 parent f0abe2f commit 51709c9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Html/Column.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ public function visible(bool $flag = true)
191191
return $this;
192192
}
193193

194+
/**
195+
* Set column hidden state.
196+
*
197+
* @return $this
198+
* @see https://datatables.net/reference/option/columns.visible
199+
*/
200+
public function hidden()
201+
{
202+
return $this->visible(false);
203+
}
204+
194205
/**
195206
* Append a class name to field.
196207
*

0 commit comments

Comments
 (0)