views\site\index.php:
<?php Pjax::begin(); ?> <?= Html::a("Refresh", ['site/index'], ['class' => 'btn btn-lg btn-primary']);?> <h1>Current time: <?= $time ?></h1> <?php Pjax::end(); ?>
public function actionIndex() { return $this->render('index', ['time' => date('H:i:s')]); }