Skip to content

Commit

Permalink
Update Datatables
Browse files Browse the repository at this point in the history
  • Loading branch information
lelinhtinh committed Aug 4, 2019
1 parent 4277379 commit 4751172
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/Datatables.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,12 @@ public function getQuery(): Query
}

/**
* @param array $columns
* @param string $column
* @return Datatables
*/
public function hide($searchable = false, ...$columns): Datatables
public function hide(string $column, $searchable = false): Datatables
{
foreach ($columns as $column) {
if (\is_array($column)) {
$this->hide($searchable, ...$column);
} else {
$this->columns->getByName($column)->hide($searchable);
}
}

$this->columns->getByName($column)->hide($searchable);
return $this;
}

Expand Down

0 comments on commit 4751172

Please sign in to comment.