sangroya / yii2-detailview
Enhanced the DetailView widget of yii2 framework using bootstrap classes
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-04-14 02:33:32 UTC
README
Enhanced the DetailView widget of yii2 framework using bootstrap classes
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist sangroya/yii2-detailview "*"
or add
"sangroya/yii2-detailview": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= echo \sangroya\DetailView::widget([ * 'model' => $model, * 'attributes' => [ ['group'=>true,'label'=>'Personal Detail'] * 'title', // title attribute (in plain text) * 'description:html', // description attribute in HTML * [ // the owner name of the model * 'label' => 'Owner', * 'value' => $model->owner->name, * ], * 'created_at:datetime', // creation date formatted as datetime * ], 'header'=>false //by default it's true and set the header on the top * ]); ?>```