Refresh

Current time: 19:13:40


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(); ?>

controllers\SiteController.php:
public function actionIndex()
{
    return $this->render('index', ['time' => date('H:i:s')]);
}