title: TypeError Yii2 Framework
body: <p>yii\base\View::{closure}(): Argument #2 ($model) must be of type Libro, app\models\Libro given</p>
  <p>in C:\xampp\htdocs\biblioteca\views\libro\index.php</p>
  <pre><code>'filterModel' =&gt; $searchModel,
  'columns' =&gt; [
      ['class' =&gt; 'yii\grid\SerialColumn'],
  
      'id',
      'titulo',
      'imagen',
      [
          'class' =&gt; ActionColumn::className(),
       *   'urlCreator' =&gt; function ($action, Libro $model, $key, $index, $column) {*
              return Url::toRoute([$action, 'id' =&gt; $model-&gt;id]);
           }
      ],
  ],
  </code></pre>
  <p>]); ?&gt;</p>