jeudi 31 janvier 2019

I search set Column Class for laravel-datatables

In my laravel 5.7/ blade / jQuery v3.3.1 / Bootstrap v4.1.2 app

I use "yajra/laravel-datatables-oracle": "~8.0" library and when I need to change class of some rows depending on value of some field I do :

return Datatables
    ::of($votesCollection)
    ->setRowClass(function ($vote) {
        return $vote->status == 'N' ? ' row_new_status' : ($vote->status == 'I' ? 'row_inactive_status' : '');
    })

It works ok, but I did not find any similar methods for columns. Are there ? Can it be implemented in some way ?

Thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Sghco1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire