PHP code example of errohitsinghal / yii2-ajaxcrud-bs5-advanced

1. Go to this page and download the library: Download errohitsinghal/yii2-ajaxcrud-bs5-advanced 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/ */

    

errohitsinghal / yii2-ajaxcrud-bs5-advanced example snippets


'modules' => [
    'gridview' =>  [
        'class' => \kartik\grid\Module::class,
        'bsVersion' => '5.x', 
        // 'downloadAction' => 'gridview/export/download',
        // 'i18n' => [],
        // 'exportEncryptSalt' => 'tG85vd1',
    ]       
]


// In your view file
echo Html::a('Delete', ['delete', 'id' => $model->id], [
    'class' => 'btn btn-danger',
    'data' => [
        'confirm-title' => 'Confirm Delete',
        'confirm-message' => 'Are you sure you want to delete this record?',
        'confirm-passcode' => 'true',
        'confirm-passcode-type' => 'Admin Password',
        'confirm-passcode-value' => 'your-secret-code',
        'confirm-ok' => 'Delete',
        'confirm-cancel' => 'Cancel',
        'request-method' => 'POST'
    ]
]);


// In your controller action that returns modal content
return [
    'title' => '<i class="fa fa-sort-amount-down me-2"></i>Seeding: ' . Html::encode($eventStage->stage_name),
    'size' => 'large',
    'content' => $this->renderAjax($view, $viewParams),
    'footer' => Html::button('Close', [
        'class' => 'btn btn-secondary',
        'data-bs-dismiss' => 'modal',
        'data-pjax-refresh' => $pjaxId  // The ID of your Pjax container (without #)
    ]),
];

php composer.phar