searchPane Results not grouped

searchPane Results not grouped

cmpluscmplus Posts: 51Questions: 10Answers: 0

I'm trying to make the searchPane work but I don't understand where I'm going wrong, I need help, I'm trying to search everywhere but I'm not getting any answers. I don't understand why the results are not grouped but are entered individually and not grouped with counting, can you help me?

->searchPane(

            'luogo',

            fn() => Ticket::query()->whereYear('created_at', '2023') ->whereMonth('created_at','08')
           ->select('id as value', 'luogo as label')->get(),

            function (\Illuminate\Database\Eloquent\Builder $query, array $values) {
                return $query
                    ->whereIn(
                        'luogo',
                        $values);
            }
            
        );

dbe7bf416dc38cdb019821f35351fa9a.png

Sign In or Register to comment.