Replies: 1 comment 1 reply
-
Do you want to load the tickets per status? Maybe something like: (TicketsDataTable)
public function query(Ticket $model): QueryBuilder
{
return $model->newQuery()
->whereYear('created_at', '2023')
->when(request()->filled('status'), fn($q) => $q->whereIn('status', [closed',' suspended']))
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created the tables with the command php artisan datatables:make Tickets, and php artisan datatables:editor Tickets, everything works perfectly now if I create a new table and add
it works properly. I wanted to do in the controller to create specific tables and I tried to do
but nothing is filtered the page loads the table with everything and not just with the values I'm looking for, where am I going wrong?
Beta Was this translation helpful? Give feedback.
All reactions