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 Gii CRUD generation with fields spaces in names

I have a PostgreSQL database with spaces in both table names and field names. I have no control over this database structure. The problem isn't the table names, but the field names with the scaffold CRUD code. Here's an example: CREATE TABLE…
JohnG
  • 429
  • 1
  • 4
  • 14
0
votes
2 answers

The table does not exist: {{%active_record}}

I am new to yii and learing generating the CRUD operation through gii first i create a country table and generate the model and controller and views using gii i am get following error Invalid Configuration – yii\base\InvalidConfigException The table…
Anil Kumar Sahu
  • 567
  • 2
  • 7
  • 27
0
votes
2 answers

How to change default template in Yii2?

I am using the Yii 2 Advanced Application Template, the AdminLTE Asset Bundle and the Gii code generator. Here is my example: I need to change the template so I can remove the "Create Lab Tipos Movimientos" button (and modify some things more). I…
Roby Sottini
  • 2,117
  • 6
  • 48
  • 88
0
votes
2 answers

Yii2 Gii : Add autocomplete and class name generation to custom template

I recently began creating my own Gii templates, in this case, for CRUD. Now I noticed, when creating a Model with Gii you have an autocomplete for the table name and, after this is selected, the Model class name is automatically generated as…
StoryTeller
  • 1,673
  • 12
  • 30
0
votes
1 answer

Yii2 Gii write own sql to filter data

I used gii in yii2 to generate a crud system. I need to write this sql to filter correct data in table. $date_now = date('Y-m-d'); $query = "SELECT * FROM reservation_db WHERE STR_TO_DATE(date,'%d-%m-%Y') > '$date_now'"; I know this is wrong, I…
0
votes
2 answers

Cannot start gii generator

I am trying to start gii generator but for some reason it doesn't start. I am working in web server not in my localhost. I set the gii in the config file like this: if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment …
0
votes
0 answers

Yii2 DataView data-key

I am new to Yii / PHP coming from the mainframe/midrange world, so I hope this make sense I was following Definitive guide to Yii 2.0 and the section on Gii -> CRUD Generator The generated code (Gridview) works great for one table works great and…
Ron
  • 3
  • 2
0
votes
0 answers

Why can't I create CRUD with GII in Yii2

I have made the view table with function "join" in sql. but when I try to generate the view table with gii, it was said that "Table associated with Rangkuman must have primary key", and I have made primary key with table that associated with…
dewinataria
  • 97
  • 10
0
votes
1 answer

why cant I generate with gii in Yii2?

I made the view table with function "join" in sql. but when I try to generate the view table with gii, it was said that "Table associated with Rangkuman must have primary key", and I have made primary key with table that associated with Rangkuman.…
dewinataria
  • 97
  • 10
0
votes
0 answers

Yii2 oracle 11g gii relations timeout

I have: Windows Server 2012 R2 wampserver 3.0.6 64bit yii2 php_oci8_12c enabled, php_pdo_oci enabled, oracle instantclient-basiclite-windows.x64-12.1.0.2.0 System Path defined according added mod_fcgid 2.3.9 to Apache added oci8 2.0.12 Thread Safe…
user2511599
  • 796
  • 1
  • 13
  • 38
0
votes
2 answers

Yii2: add field to autogenerated CRUD (automatically?)

Yii2 has a feature of generating CRUD for table with gii. It creates several files: controller, model, search model and views. What if after generating CRUD I need to add more fields to the table? I see that I need to…
cronfy
  • 1,001
  • 1
  • 15
  • 32
0
votes
1 answer

Install a new libary in Yii 2 via composer

I have a problem in yii 2 installing libary via composer. I want to install yii2-kartikgii (warrence/yii2-kartikgii) into my yii 2. I do the instruction and add "warrence/yii2-kartikgii": "dev-master" to my composer.jason and then in terminal (I use…
ali
  • 23
  • 6
0
votes
3 answers

Can't access CRUD created via gii from url

I want to make a todo application with Yii2 Framework. I used the Gii plugin and created models, controllers and views. But when I type the address in the address bar to the index of the list error 404 occurs. My index is on…
Taurus
  • 19
  • 5
0
votes
1 answer

Create auto generated forms for each new table

I use yii2 framework in my application and I have a table named objects in my SQL database "objects" ( object_id , object_typeID , ... ) But we have some objects that have special fields and user should be able to add custom fields to objects…
amir zaghari
  • 89
  • 14
0
votes
2 answers

Attribute name must contain word characters only

I'm creating a profile form using gii and after doing the gii part and when I open the page for creating the form and I click on the "Creating Profile" it shows up with this error: Invalid Parameter – yii\base\InvalidParamException Attribute name…
Amir
  • 523
  • 1
  • 5
  • 24