PHP code example of gamitg / yii2-detailview4cols

1. Go to this page and download the library: Download gamitg/yii2-detailview4cols library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gamitg / yii2-detailview4cols example snippets


<?= \gamitg\detailview4cols\DetailView4Col::widget(); 

	<?= \gamitg\detailview4cols\DetailView4Col::widget([
		        'model' => $model,
		        'options'=>['class'=>'table table-striped table-bordered detail-view'],
		        'attributes' => [
					'id',
					[
		        		'attribute' => 'user_id',
		        		'value' => $model->user->user_name,
		        		'oneRow' =>true
					],
			        'page.page_no',
			        'comment:ntext',
			        'time:datetime',
			        [
					   	'attribute'=>'created_by',
						'value'=>(!empty($model->user_id) ? $model->user_id : "Not Set")
				    ],
		        ],
    	]) 

php composer.phar