Skip to content

Use custom model functions as column and make it searchable and sortable #320

Closed Answered by rappasoft
Restingo asked this question in Q&A
Discussion options

You must be logged in to vote
Column::make('E-mail', 'email')
    ->sortable()
    ->searchable()
    ->format(function($value, $column, $row) {
        return $row->getDefaultEmail();
    })
    ->asHtml(),

https://github.com/rappasoft/laravel-livewire-tables/wiki/Using-the-built-in-cell-formatting

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Restingo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants