本文整理汇总了PHP中common\models\Comment::getMessagesQuantityByBlogId方法的典型用法代码示例。如果您正苦于以下问题:PHP Comment::getMessagesQuantityByBlogId方法的具体用法?PHP Comment::getMessagesQuantityByBlogId怎么用?PHP Comment::getMessagesQuantityByBlogId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common\models\Comment
的用法示例。
在下文中一共展示了Comment::getMessagesQuantityByBlogId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<div class="col-md-3" style="text-align: right">
<span class="glyphicon glyphicon-time bold dark-color"
aria-hidden="true"></span>
<span
class="dark-color"><?php
echo ' ' . Yii::$app->formatter->asDate($model->created_at, 'short') . ' ' . Yii::$app->formatter->asTime($model->created_at, 'short');
?>
</span>
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"
style="margin-left:10px"> <?php
//= $model->view
?>
</span>
<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"
style="margin-left:10px"> <?php
echo Comment::getMessagesQuantityByBlogId($model->id);
?>
</span>
</div>
</div>
</div>
</div>
示例2:
<div class="caption time">
<span class="glyphicon glyphicon-time bold dark-color"
aria-hidden="true"></span>
<span
class="dark-color"><?php
echo ' ' . Yii::$app->formatter->asDate($blog->created_at, 'short') . ' ' . Yii::$app->formatter->asTime($blog->created_at, 'short');
?>
</span>
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"
style="margin-left:10px"><?php
echo $blog->view;
?>
</span>
<span class="glyphicon glyphicon-bullhorn" aria-hidden="true"
style="margin-left:10px"><?php
echo Comment::getMessagesQuantityByBlogId($blog->id);
?>
</span>
</div>
</div>
</a>
</div>
<?php
}
?>
<?php
} else {
?>
<h3>Ничего не найдено</h3>
<?php
}