MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 258 forks source link

Filter rows based on a column value #476

Closed robman70 closed 2 years ago

robman70 commented 2 years ago

Hello, how can I filter the rows shown in a datatable, based on the value of a column (eg: active = true)?

robman70 commented 2 years ago

Solved using:

public function builder()
{
    return User::where('users.deleted', 0);
}
Christophvh commented 2 years ago

please close the issue when it is solved. @robman70

robman70 commented 2 years ago

Sorry... you're right. @Christophvh