Questions tagged [gii]

Gii is the web-based code generation tool of Yii Framework. While you can add your own code templates to Gii, it is equipped with templates for Controllers, CRUDs, Forms, Models and Modules.

Starting from version 1.1.2, Yii is equipped with a Web-based code generation tool called Gii. It supersedes the previous yiic shell generation tool, which runs on command line.

Detailed instructions about Gii can be found here: http://www.yiiframework.com/doc/guide/1.1/en/topics.gii

163 questions
0
votes
1 answer

Yii2 workflow gii code generator

i like to create the workflow using Gii in yii2.0, for that i was installed https://github.com/raoul2000/yii2-workflow-view, via my composer. after successful installation there is no workflow generator in gii. code in composer.json …
sen
  • 129
  • 5
  • 13
0
votes
1 answer

how to change the default form input size in yii2

i have creted a form by gii CRUD application. but the form has very wide input fields i don't want that much wide input fields. how can i do that. Any suggestion are highly welcome.my form code is.
rahul s negi
  • 139
  • 14
0
votes
1 answer

YII2.0 table name does not exist

I am new one for the YII2.0,i like to create a model for the database via GII, but its throw an error like "table does not exist". Below attached the screen for your further reference
sen
  • 129
  • 5
  • 13
0
votes
1 answer

Gii doesn't recognize many-to-many relationship to itself?

So I am trying to implement a friendlist, the above is the SQL diagram I made for my simple project and after generating the Models. I realized there was something wrong with the way Gii generated the model. I wanted to make a many-to-many…
jarvan
  • 449
  • 3
  • 9
  • 25
0
votes
0 answers

Is there better code generation for Yii2 other than Gii

I have the following database design, represented in the diagram,: As the diagram demonstrates, Invoices model has one to many relation with InvoiceItems model. However, when I use Gii to produce CRUD it generates inovieces/view without any…
SaidbakR
  • 13,303
  • 20
  • 101
  • 195
0
votes
2 answers

Yii2 Gii generated create view not working / saving but update does

Just started with Yii (two weeks ago). TL;DR Creating through Gii generated views not working, but update does, even they share the form and controller not edited. Problem: I use the Yii2 advanced app template. Then I generated a model through the…
mfgmicha
  • 3,784
  • 1
  • 25
  • 26
0
votes
3 answers

Need Cloud9 workspace IP address to access Yii2's Gii

I am trying to access the Yii2 framework's auto code generator (Gii) and I need the IP address for the Cloud9 workspace server I am on. http://www.yiiframework.com/doc-2.0/guide-start-gii.html I tried doing an "echo $IP" from the CLI and it gives me…
Dean Friedland
  • 773
  • 2
  • 12
  • 32
0
votes
1 answer

Yii2 generate model programmatically

How can i create action page that can call gii to generate model programmatically? I want to create a website that user can create there table. Thanks
joshua pogi 28
  • 521
  • 1
  • 6
  • 15
0
votes
1 answer

Yii framework config/main.php doesnt contain gii to work with

I have been using vagrant with yii framework, I have already created a virtual server and I have put my YII framework there. it is connected to my database and its works fine, however when I go to index.php?r=gii i get the following error:Error…
David
  • 165
  • 12
0
votes
2 answers

Yii2: Gii-generated attributes in GridView

I'm a little bit confused about how Yii2 attributes work. If I have two tables (say tradition, culture) with a one-to-many relationship (i.e. one tradition could be present in several cultures) I could use Gii generated code and get in model…
Antonio López
  • 386
  • 6
  • 22
0
votes
1 answer

custom field in yii2 without generator and using database

how to add custom fields in Yii-2.i have table user ,there i have fields and creating form with but later user can add custom fields so how i create those fields in view without generator.
user3668677
  • 13
  • 1
  • 6
0
votes
2 answers

Yii2- Failed to create Mongodb models using Gii

I can't create MongoDb models using Gii module code generator. Gets the below error : Unknown Method – yii\base\UnknownMethodException Calling unknown method: common\components\MongoConnection::getTableSchema()
sapo
  • 69
  • 1
  • 3
  • 10
0
votes
1 answer

Gii model generation not getting past first step - strange bevavior, what's causing this?

I've installed the latest version of yii2 using the advanced template. The website is working fine. For some reason the Gii generation tool is stuck and does not react as expected after clicking the preview button. Instead of showing a new form with…
andypotter
  • 130
  • 6
0
votes
1 answer

Yii2 Gii : You are not allowed to access this page

I'm using Yii2 advance template and I can access gii tool successfully in my local machine. But when I upload it into real server, there is a message "You are not allowed to access this page." Could you tell me which file should I have to config …
Chhorn Soro
  • 3,061
  • 8
  • 27
  • 43
0
votes
1 answer

Yii model generation

you know that using gii tool we can generate models and view controllers, so, the question is : Is it possible to generate a model without using the gii tool, I mean, just doing it through the php code like calling some method giving required…
Aleksandr Sasha
  • 168
  • 1
  • 12