D
D
dwpoint2022-04-21 21:28:41
Yii
dwpoint, 2022-04-21 21:28:41

How to display categories in Accordion::widget?

Guys, I now have an output in the FAQ using Accordion::widget.

<?= Accordion::widget([
        'items' => array_map(function ($item) {
            return [
                'label' => $item['name'],
                'content' => $item['description']
            ];
        }, $items),
    ]);

    ?>

I made categories. Can you please tell me how to group questions and categories? To be something like this:
-zkGjHZEsx51JasF5yd8hN4_eW3SnfoddHhYB7kZEV1Wg6n66qV7AkJsKRDDnbigTGQq_OMCuC2vmTLl7pkKsuvv.jpg?size=772x788&quality=96&type=album

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question