Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
692 B
4
Indexable
Never
<?php
                $services = Services::find()->featured()->limit(4);
                foreach ($services as $service):
            ?>
            <div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
                <div class="icon-box">
                    <div class="icon"><i class="<?php echo $service->icon; ?>"></i></div>
                    <h4 class="title"><a href="#"><?= $service->title ?></a></h4>
                    <p class="description"><?php echo $service->detail; ?></p>
                </div>
            </div>
            <?php endforeach; ?>


public function featured(){
        return $this->andWhere(['is_featured' => 1]);
    }