johnsnook/yii2-bootstrap4-card

It's an amazing widget that encapsulates bootstrap cards.

dev-master 2018-08-08 15:46 UTC

This package is not auto-updated.

Last update: 2024-11-19 18:46:42 UTC


README

It's a widget that encapsulates bootstrap cards.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist johnsnook/yii2-bootstrap4-card "*"

or add

"johnsnook/yii2-bootstrap4-card": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php                                                                            
     echo Card::widget([                        
        'headerOptions' => ['class' => 'bg-secondary'],
        'title' => 'Top card',                   
        'body' => $aBunchOfHtml,                 
     ]);
	/* OR */
     echo Card::begin([                         
        'containerOptions' => ['class' => 'border border-secondary'],
        'headerOptions' => ['class' => 'bg-dark text-white'],
        'title' => 'Top card',
 	]);
?>                                                                              <p class="card-text">                      
 <?= echo CardlWidget::end();

. . . . . . . . . . .