Skip to content

Conversation

@yajra
Copy link
Owner

@yajra yajra commented Sep 22, 2025

Added

Options from Array

    public function dataTable(QueryBuilder $query): EloquentDataTable
    {
        return (new EloquentDataTable($query))
            ->with('columnControl', [
                'is_active' => Options::from([1 => 'Yes', 0 => 'No']),
            ])
            ->setRowId('id');
    }

Column Control Builder

    public function handle(): Builder
    {
        return $this->getHtmlBuilder()
            ->setTableId('users-table')
            ->languageSearchPlaceholder('Search Users')
            ->selectSelector()
            ->selectStyleOs()
            ->postAjax(route('users.index'))
            ->orderBy(1, 'asc')
            ->buttons($this->getButtons())
            ->columns($this->getColumns())
            ->editors($this->getEditors())
            ->columnControlSearch();
    }

@sonarqubecloud
Copy link

@yajra yajra merged commit 93b8ba9 into master Sep 22, 2025
2 checks passed
@yajra yajra deleted the column-control branch September 22, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants