Code Generation

Backend CRUD module

Phundament allows you to use you custom designed database schema as the base for CRUD admin interfaces. To kickstart you application backend create a new crud module with Yii's built-in tools

If you would like to create an extension module in a composer package, please start by creating an extension first push it to your repo and install it with composer require --prefer-source name/package. Afterwards generate your code directly into vendor/name/package and use this repository for development.

./yii gii/module \
    --moduleID=crud \

and add it to your application config

    'modules'    => [
        'crud'    => [
            'class'  => 'app\modules\crud\Module',
            'layout' => '@admin-views/layouts/main',

create the backend CRUDs with gii and Giiant

./yii giiant-batch \
  --interactive=0 \
  --overwrite=1 \
  --modelDb=dbSakila \
  --modelBaseClass=app\\models\\SakilaActiveRecord \
  --modelNamespace=app\\models\\sakila \
  --crudControllerNamespace=app\\modules\\crud\\controllers \
  --crudViewPath=@app/modules/crud/views \
  --crudPathPrefix= \

See Giiant documentation for an example with Sakila demo database.


Messages for Translations



Install required packages

./yii app/setup-docs

Generate application documentation to docs-html

./yii app/generate-docs