Datatables Editor View only a specific year

Datatables Editor View only a specific year

cmpluscmplus Posts: 51Questions: 10Answers: 0

If I want to filter the data and display only one year, I'm trying to create a variable and call it in the controller but it doesn't work I always see everything that is present in the table. How do I filter them? I want to see only a specific year and maybe a specific month, is it possible to do that?

$ticket2023 = Ticket::whereYear('created_at', Carbon::now()->year(2023))->get();
        
         $data = Editor::inst($ticket2023)
         ->fields(
Sign In or Register to comment.