public function columns($columns = [])
    {
        if (func_num_args() == 0) {
            return $this->columns;
        }

        if (func_num_args() == 1 && is_array($columns)) {
            foreach ($columns as $column => $label) {
                $this->column($column, $label);
            }

            return;
        }

        foreach (func_get_args() as $column) {
            $this->column($column);
        }
    }
public function columns($columns = [])
    {
        if (func_num_args() == 0) {
            return $this->columns;
        }

        if (func_num_args() == 1 && is_array($columns)) {
            foreach ($columns as $column => $label) {
                $this->column($column, $label);
            }

            return;
        }

        foreach (func_get_args() as $column) {
            $this->column($column);
        }
    }
public function columns ( $ columns = [ ] ) { if ( func_num_args ( ) == 0 ) { return $ this -> columns ; } if ( func_num_args ( ) == 1 && is_array ( $ columns ) ) { foreach ( $ columns as $ column => $ label ) { $ this -> column ( $ column , $ label ) ; } return ; } foreach ( func_get_args ( ) as $ column ) { $ this -> column ( $ column ) ; } }
Batch add column to grid.

@example
1.$grid->columns(['name' => 'Name', 'email' => 'Email' ...]);
2.$grid->columns('name', 'email' ...)

@param array $columns

@return Collection|null
Batch add column to grid .