PHP code example of bkstar123 / bkscms-utilities

1. Go to this page and download the library: Download bkstar123/bkscms-utilities 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/ */

    

bkstar123 / bkscms-utilities example snippets

 artisan vendor:publish --provider=Bkstar123\BksCMS\Utilities\Providers\UtilitiesServiceProvider


/**
 * Menu array
 * Each link component consists of 'name', 'path', 'icon', 'children' keys
 * 'name', 'path', 'icon' are of string type, 'children' is of array type
 * 'path' for an expandable link should be '#'
 */
return [
    [
        'name' => 'Dashboard',
        'path' => '/cms/dashboard',
        'icon' => 'fas fa-tachometer-alt',
    ],
    
    [
        'name' => 'Admin Managment',
        'path' => '#',
        'icon' => 'far fa-user',
        'children' => [
            [
                'name' => 'Admins',
                'path' => '/cms/admins',
                'icon' => 'fa fa-users',
            ],
            [
                'name' => 'Create Admin',
                'path' => '/cms/admins/create',
                'icon' => 'fa fa-user-plus',
            ]
        ]
    ],

    [
        'name' => 'Role Managment',
        'path' => '#',
        'icon' => 'fa fa-certificate',
        'children' => [
            [
                'name' => 'Roles',
                'path' => '/cms/roles',
                'icon' => 'fa fa-user-circle',
            ],
            [
                'name' => 'Create Role',
                'path' => '/cms/roles/create',
                'icon' => 'fa fa-plus',
            ]
        ]
    ],

    [
        'name' => 'Permission Managment',
        'path' => '#',
        'icon' => 'fa fa-universal-access',
        'children' => [
            [
                'name' => 'Permissions',
                'path' => '/cms/permissions',
                'icon' => 'fa fa-ship',
            ],
            [
                'name' => 'Create Permission',
                'path' => '/cms/permissions/create',
                'icon' => 'fa fa-plus',
            ]
        ]
    ],
];
 CrudView::checkAllBox(string $color = '')
 CrudView::checkBox(Model $resource, string $color = '')
 CrudView::activeStatus(Model $resource, string $followRoute, string $color = '', string $text = '')
 CrudView::disabledStatus(Model $resource, string $followRoute, string $color = '', string $text = '')
 CrudView::removeAllBtn(string $followRoute, string $color = '', string $text = '')
  CrudView::removeBtn(Model $resource, string $followRoute, string $color = '', string $text = '')
 CrudView::searchInput(string $searchRoute, string $inputName = 'search')