PHP code example of whykrr / datatables-builder

1. Go to this page and download the library: Download whykrr/datatables-builder 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/ */

    

whykrr / datatables-builder example snippets


    $psr4 = [
        'Config'            => APPPATH . 'Config',
        APP_NAMESPACE       => APPPATH,
        'App'               => APPPATH,
        'DatatablesBuilder' => APPPATH .'ThirdParty/datatablesbuilder/src',
    ];

    // Example configuration
    public $tableSetting = [
        'users' => [
            'col_title' => 'First Name,Last Name,Adress,Status',
            'col_data' => 'first_name,last_name,address,status',
            'helpers' => [
                'status' => ['formatStatus', '{status}'],
            ],
            'numbering' => true,
            'action_button' => 'edit,delete',
        ],
    ];

    'helpers' => [
        'key_name_tobe_overwrite' => ['function_name', 'arguments'],
    ],
sh
php spark dtbuilder:publish