PHP code example of davidyell / nice-admin

1. Go to this page and download the library: Download davidyell/nice-admin 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/ */

    

davidyell / nice-admin example snippets


$this->loadHelper('NiceAdmin.StatusLights', $options);
$this->loadHelper('NiceAdmin.Actions');
$this->loadHelper('NiceAdmin.Gravatar');
$this->loadHelper('NiceAdmin.Boolean');

$options = [
    1 => [
        'label'=>'Live',
        'class'=>'label label-success'
    ],
    2 => [
        'label'=>'Inactive',
        'class'=>'label label-inverse'
    ],
    3 => [
        'label'=>'Deleted',
        'class'=>'label'
    ]
);

$optons = 
    1 => [ // true
        'class'=>'badge badge-success',
        'display'=>'&#10004;'
    ],
    0 => [ // false
        'class'=>'badge badge-important',
        'display'=>'&#10008;'
    ]
)

<td>
	<?= $this->StatusLights->status($entity->id); 

<td class="actions">
	 echo $this->Actions->actions($entity->id, ['e','d'], 'myController', 'icons');

<?= $this->Boolean->display(1);