schmunk42 / yii2-giiant
Gii CRUD generator for Yii 2 Framework
Installs: 385 357
Dependents: 22
Suggesters: 0
Security: 0
Stars: 272
Watchers: 39
Forks: 120
Open Issues: 41
Type:yii2-extension
Requires
- cmrcx/phptidy: ^3.1
- dmstr/yii2-bootstrap: ^0.1.2 || ^0.2.1
- dmstr/yii2-db: *
- dmstr/yii2-helpers: *
- friendsofphp/php-cs-fixer: 1.* || 2.* || 3.*
- yiisoft/yii2: ~2.0.13
- yiisoft/yii2-gii: ^2.2.0
Requires (Dev)
- codeception/codeception: ^2.2
- codeception/specify: ^0.4
- dmstr/yii2-web: ^0.4.2 || ^1.0.0
- insolita/yii2-adminlte-widgets: 1.1.*
- rmrevin/yii2-fontawesome: 2.*
- yiisoft/yii2-faker: 2.*
Suggests
- kdn/yii2-json-editor: JSON editor widget for Yii 2.
- dev-master
- 1.0.1
- 1.0.0
- 0.15.0-beta2
- 0.15.0-beta1
- 0.14.0-beta1
- 0.13.0
- 0.13.0-beta2
- 0.13.0-beta1
- 0.12.0
- 0.11.2
- 0.11.1
- 0.11.0
- 0.11.0-beta3
- 0.11.0-beta2
- 0.11.0-beta1
- 0.10.8
- 0.10.7
- 0.10.6
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.10.0-beta2
- 0.10.0-beta1
- 0.9.2
- 0.9.1
- 0.9.1-rc1
- 0.9.0
- 0.9.0-beta6
- 0.9.0-beta5
- 0.9.0-beta4
- 0.9.0-beta3
- 0.9.0-beta2
- 0.9.0-beta1
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.8.0-beta2
- 0.8.0-beta1
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.1
- 0.1.0
- dev-feature/giiant-config-generator
- dev-feature/dev-elias
- dev-feature/wedding-2023-04
- dev-feature/max-columns
- dev-feature/marriage
- dev-feature/cleanup-giiant-module-generator-code-files
- dev-feature/gabo
- dev-rhertogh-patch-3
- dev-feature/updated-headlines
- dev-devleop
- dev-feature/pivot-url-fix
- dev-dev-develop
- dev-feature/update-testing
- dev-feature/removed-fontawesome
- dev-develop
- dev-feature/removed-return-urls
This package is auto-updated.
Last update: 2024-11-15 13:11:49 UTC
README
"Giiant is huge!"
What is this?
Giiant is an extended code-generator for models and CRUDs, based upon Gii (Yii 2.0 Framework).
It creates prototypes for database models and backends including relations defined by foreign-key constrains in no-time.
To provide a highly flexible configuration system it features a callback-provider-queue to define rendering of customized inputs, columns or attribute values.
A main project goal is porting many features and learnings from gtc, giix, awecrud and other code-generators into one solution.
Resources
Features
Batch command
yii batch
creates all models and/or CRUDs for a set of tables sequentially with a single command
Model generator
- generates separate model classes to customize and base models classes which can be regenerated on schema changes
- table prefixes can be stripped off model class names (not bound to
db
connection settings from Yii 2.0)
CRUD generator
- input, attribute, column and relation customization with provider queues
- callback provider to inject any kind of code for inputs, attributes and columns via dependency injection
- virtual-relation support (non-foreign key relations)
- model, view and controller locations can be customized to use subfolders
- horizontal and vertical form layout
- options for tidying generated code
- action button class customization (Select "App Class" option on the Action Button Class option on CRUD generator to customize)
Installation
The preferred way to install this extension is through composer.
Using a stable version
composer require schmunk42/yii2-giiant:"@stable"
Using latest master
composer require schmunk42/yii2-giiant:"@dev"
The generators are registered automatically in the application bootstrap process, if Gii module is enabled.
You can try giiant via phd (dockerized PHP application template).
Configuration
It's recommended to configure a customized batch
command in your application CLI configuration.
'controllerMap' => [
'batch' => [
'class' => 'schmunk42\giiant\commands\BatchController',
'overwrite' => true,
'modelNamespace' => 'app\\modules\\crud\\models',
'crudTidyOutput' => true,
]
],
Note:
yii giiant-batch
is an alias for the default configuration ofBatchController
registered by this extension.
You can add the giiant specific configuration config/giiant.php
, and include this from your config/main.php
.
See the batches section for configuration details.
Usage
To create a full-featured database backend, run the CLI batch command
yii batch
You can still override the settings from the configuration, like selecting specific tables
yii batch --tables=a,list,of,tables
Core commands
Show help for gii
yii help gii
Create application-module for giiant CRUDs
yii gii/giiant-module
The commands for generating models and CRUD, there are usually run via the batch command above.
yii gii/giiant-model
yii gii/giiant-crud
Advanced
Provider usage and configuration via dependency injection
See docs for details.
Using callbacks to provide code-snippets
See docs for details.
Troubleshooting
See docs for known-issues, platform specific usage, quirks, faq, ...
Extras
Special thanks to motin, thyseus, uldisn and rcoelho for their work, inspirations and feedback.
Screenshots
Built by dmstr