yii2-enhanced-gii ¶
Yii2 Gii (generator) with Relation
This page is no longer active ¶
Go to this page instead : https://github.com/mootensai/yii2-enhanced-gii
Installation ¶
The preferred way to install this extension is through composer.
Either run
$ composer require mootensai/yii2-enhanced-gii:dev-master
or add
"mootensai/yii2-enhanced-gii": "*"
to the require
section of your composer.json
file.
Then you must add this code at your config\main.php.
'modules' => [
... //your another module
'gridview' => [
'class' => '\kartik\grid\Module',
],
... // your another module
],
Usage : ¶
Go to your gii module, and notice the new IO Generator for models & CRUD
Features ¶
Model : ¶
- Generate optimistic lock
- Generate Timestamp Behaviors
- Generate Blameable Behavior
- Generate UUID Behavior
CRUD : ¶
- Generate all CRUD with wildcard (*) of table
- Generate related input output
- Specify your name/label attribute for foreign keys
- Set your column to hidden
- Specify your skipped columns
- Specify your skipped relations
- Set pluralize or not
- PDF Printable view
- Expandable / collapsible row at index grid view for related data
To Do ¶
- Nested set detector & generator
- One-page-CRUD
- Generate migrations for tables (like https://github.com/mdmsoft/yii2-gii)
I'm open for any improvement
Thanks To ¶
- Jiwanndaru (jiwanndaru@gmail.com) for creating the tradition
- kartik-v (https://github.com/kartik-v) for most of widgets
- schmunk42 (https://github.com/schmunk42) for bootstrap & model base & extension
- mdmunir (https://github.com/mdmunir) for JsBlock
Error on installing
After a fresh Yii2 basic installation:
almir$ composer require 'mootensai/yii2-enhanced-gii:dev-master' ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for mootensai/yii2-enhanced-gii dev-master -> satisfiable by mootensai/yii2-enhanced-gii[dev-master]. - mootensai/yii2-enhanced-gii dev-master requires mootensai/yii2-uuid-behavior * -> no matching package found. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. Installation failed, reverting ./composer.json to its original content. almir$
Whats the problem?
@almir I have fix this
I have fix that problem. Please try again. thanks!
Unknown Property – yii\base\UnknownPropertyException
Hi,
Installation was ok
Model and CRUD generation was OK.
When I try to use one of them I get:
Unknown Property – yii\base\UnknownPropertyException
Setting unknown property: kartik\export\ExportMenu::pjaxContainerId
Any guide where I have to look at ?
Problem with pjaxContainerId
Hi!
I have the same problem as @Kavitama.
fixing the composer.json
I'm so sorry everyone.. I'll try to fix composer.json tonight.. I changed the composer.json this morning..
@all : Fixed!
I already fix & test it. please try again..
Not installing?
Guys instead of
composer require 'mootensai/yii2-enhanced-gii:dev-master'
Use
composer require mootensai/yii2-enhanced-gii:dev-master
It will install correctly.
Suggestion!
it would be epic if this supported RBAC in the future by default. would save a lot of time on those backend-only CRUDS
Another suggestion!
it'd be cool if you could generate commands for the command app too. yii 1's awe generator did that. was cool.
New Update!!
Hi everyone!! PLEASE UPDATE!!!
There's a lot of new feature & bug fix (especially database related engine)
you can see release notes here
https://github.com/mootensai/yii2-enhanced-gii/releases/tag/0.0.7
Thanks a lot for trying my extensions!
Thanks for your improvements
Newest update will be notified at github, I rarely update this page
https://github.com/mootensai/yii2-enhanced-gii
auto increment IDs
Hi there. I liked your extension. Great job.
I have a question for you. When I create a new record, my auto-increment IDs are not generated sequential by model->saveAll() function.
The numbers look increasing exponentially like, 1, 199, 5323, 63432, ... instead of 1,2,3,4,5,6,etc.
Is this a problem you or anybody else encountered?
Thanks.
Auto increment not sequence
@ozgurb
Yes I also facing same problem in particular model only. Any Solutions?.
Please use github page
Please update using github version :
https://github.com/mootensai/yii2-enhanced-gii
If you still having issue, please make issue on github
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.