'Yii2 ListView summary unknown property
When I try to run the following code
<?=
ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_fichaRevista',
'summary ' => '',
]);
?>
I get this Exception:
Unknown Property – yii\base\UnknownPropertyException
Setting unknown property: yii\widgets\ListView::summary
Why?
According to the documentation
summary
property is correct.
What is going wrong?
Solution 1:[1]
That is because you have a white-space
in the property name summary
in the end remove it and it will work or copy paste from below
<?=
ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_fichaRevista',
'summary' => '',
]);
?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Muhammad Omer Aslam |