PHP code example of biladina / yii2-ajaxcrud-bs4

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

    

biladina / yii2-ajaxcrud-bs4 example snippets


'modules' => [
    'gridview' =>  [
        'class' => '\kartik\grid\Module'
    ]       
]

'components' => [
    'i18n' => [
        'translations' => [
            'yii2-ajaxcrud' => [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@yii2ajaxcrud/ajaxcrud/messages',
                'sourceLanguage' => 'en',
            ],
        ]
    ]
]

return [
    'bsVersion' => '5.x',
];

'language' => 'id-ID',

'components' => [
    'i18n' => [
        'translations' => [
            'yii2-ajaxcrud' => [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@yii2ajaxcrud/ajaxcrud/messages',
                'sourceLanguage' => 'id',
            ],
        ]
    ]
]

return [
    'forceReload'=>'#crud-pjax1,#crud-pjax2', // you can add more Pjax ID that you want to reload via ajax respond.
    'title'=> Yii::t('yii2-ajaxcrud', 'Create New')." Content",
    'content'=>'<span class="text-success">'.Yii::t('yii2-ajaxcrud', 'Create').' Content '.Yii::t('yii2-ajaxcrud', 'Success').'</span>',
    'footer'=> Html::button(Yii::t('yii2-ajaxcrud', 'Close'), ['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
        Html::a(Yii::t('yii2-ajaxcrud', 'Create More'), ['create'],['class'=>'btn btn-primary','role'=>'modal-remote'])
];

php composer.phar 

php composer.phar