I'm studying yii2 framework. I have a trouble when use listview wiget. When I click next page I want to update page but not reload. but I don't know how do it? this is url when click next page:
http://......&page=1&per-page=5
Please help me?
Thank you so much.
Do like this:
use yii\widgets\Pjax;
Pjax::begin([
'enablePushState' => false, // to disable push state
'enableReplaceState' => false // to disable replace state
]);
echo ListView::widget([...]);
Pjax::end();
For more info refer this link: http://www.yiiframework.com/doc-2.0/yii-widgets-pjax.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With