Carousel widget bootstrap

Hello everyone, there is such a problem with the carousel widget.
In the controller, I transfer the data array for the carousel in the view.
Controller Code:
**$carousel_img = (new \yii\db\Query())
->select(’{{%carousel}}.*’)
->from(’{{%carousel}}’)
->all();
return $this->render(‘index’, [
‘carousel_img’ => $carousel_img,
]);
The view comes full array.
**
View Code:
**

<?php echo Carousel::widget([ 'items' => [ [ 'content' => '' . '', 'caption' => '

' . $carousel_img["title"] . '

', 'options' => [] ] ], 'options' => ['class' => 'carousel slide', 'data-interval' => '12000'], 'controls' => [ '', '' ] ]); ?>

**
How to pass the array processing correctly so that the entire array is loaded into the slider, and not just the last element in the array?