Tabs how to call different Views


(Tresrob) #1

Hello

I would like to use the tabs
use yii\bootstrap\Tabs;

to call up different views (index.php)

I have not found examples and this is my code:

echo Tabs::widget([
‘items’ => [
[
‘label’ => ‘List 1’,
‘content’ => $this->render(‘index1’, [
‘searchModel’ => $searchModel,
‘dataProvider’ => $dataProvider,
]),
‘active’ => true
],

    [
        'label' => 'List 2',
			'content' => $this->render('index1', [
			'searchModel' => $searchModel,
			'dataProvider' => $dataProvider,
	]),
        'active' => true 
    ],

unfortunately I can only call the first view (List 1) but I cannot call the second view since it has a different model.
Can anyone help me ? How can I call different models?
Thank you