public function columns(array $columns)
{
foreach ($columns as $key => $value) {
if (!is_a($value, Column::class)) {
if (is_array($value)) {
$attributes = array_merge(['name' => $key, 'data' => $key], $this->setTitle($key, $value));
} else {
$attributes = ['name' => $value, 'data' => $value, 'title' => $this->getQualifiedTitle($value)];
}
$this->collection->push(new Column($attributes));
} else {
$this->collection->push($value);
}
}
return $this;
}