spicytuna8/yii2-ajaxcrud-bs5

Gii CRUD template for Single Page Ajax Administration for yii2

v1.0.0 2025-05-12 11:24 UTC

This package is not auto-updated.

Last update: 2025-05-13 08:34:48 UTC


README

Original work by johitvn. Gii CRUD template for Single Page Ajax Administration for yii2

![yii2 ajaxcrud extension screenshot] image image

Features

  • Create, read, update, delete in onpage with Ajax
  • Bulk delete suport
  • Pjax widget suport
  • Export function(pdf,html,text,csv,excel,json)

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist spicytuna8/yii2-ajaxcrud-bs5 "*"

or add

"spicytuna8/yii2-ajaxcrud-bs5": "*"

to the require section of your composer.json file.

Usage

For first you must enable Gii module Read more about Gii code generation tool

Because this extension used kartik-v/yii2-grid extensions so we must config gridview module before

Let 's add into modules config in your main config file

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

Add translation to the config

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

Add bsVersion to the params file

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

You can then access Gii through the following URL:

http://localhost/path/to/index.php?r=gii

and you can see Ajax CRUD Generator