foreach ($articulos as $key => $value) {
    ?>
            <article class="post clear-fix">
                <?php 
    echo Html::a(Html::img('@web/img/categories/' . $value->categoria->seo_slug . '.png', ['alt' => $value->categoria->categoria, 'class' => 'img-thumbnail']), ['/categoria/' . Html::encode("{$value->categoria->seo_slug}")], ['class' => 'thumb pull-left']);
    ?>

                <h3 class="post-title">
                    <?php 
    echo Html::a(Html::encode("{$value->titulo}"), ['/articulo/' . Html::encode("{$value->seo_slug}")], ['title' => Html::encode("{$value->titulo}")]);
    ?>
                </h3>

                <div class="post-date">
                    <span class="glyphicon glyphicon-user">&nbsp;</span><span class="post-author"><?php 
    echo ucWords(HTml::encode("{$value->createdBy->name}"));
    ?>
</span>
                    &nbsp;|
                    <span class="glyphicon glyphicon-calendar">&nbsp;</span><?php 
    echo strftime("%c", strtotime($value->created_at));
    ?>
                </div>

                <p class="post-content">
                    <?php 
    if (empty($value->resumen)) {
        echo HtmlPurifier::process(Helper::myTruncate($value->detalle, 300, " ", "..."));
    } else {
        echo $value->resumen;
    }
 /**
  * @param \zhuravljov\yii\rest\models\ResponseRecord $record
  * @param \yii\web\View $view
  * @return string
  */
 public function format($record, $view)
 {
     return Html::tag('pre', Html::tag('code', HTml::encode($record->content)));
 }