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
1
vote
2 answers

Error in Gii Code Generator Page

Im trying to access my Yii code generator which is Gii. but when i browse it using http://localhost/mysite/gii/index/ the page says Error 404 Unable to resolve the request "gii/index". this is my .htaccess file for url-rewriting Options…
Netorica
  • 18,523
  • 17
  • 73
  • 108
1
vote
2 answers

does gii automatically create relations for generated models?

I'm new to Yii here. In the documentation, it seems to imply that gii will create the relations for related models. But when using gii to generate models from DB, it doesn't seem to be the case. For example, I have a user table and a profile table…
Anh Pham
  • 5,431
  • 3
  • 23
  • 27
1
vote
2 answers

Yii2 Two different way for breadcrumbs

I have a gii generated view.php page, which can be reached from two different paths, but the breadcrumbs is the same. Anyone know how to fix? Let me explain: I have the view.php view which shows the summary of the report made and can be reached from…
WorraccCdP
  • 39
  • 6
1
vote
2 answers

How can I resolve yii2 Not Found #404 problem?

I have created new controller in the project with gii but I am getting Not Found (#404) error when I try to access it.please help me why i get this error? here is the controller:
1
vote
1 answer

error create model in CRUD generator gii yii2 framework

I have created a model class using Model generator Gii with namespace common\models\Artikel and there is no error but when I'm trying to create a model class using CRUD generator Gii, there is a error like this: In my Models folder there is folder…
Nana
  • 53
  • 3
1
vote
1 answer

Multiple category id with parent id gii ini product yii2

I want to make a multiple category dropdown in product form yii2. The table category has a parent_id column. So when I want to choose the category with parent_id 0 or 1 it shows other categories with that parent_id. I use gii generator. Can you help…
Ice
  • 21
  • 3
1
vote
1 answer

Class 'Device' does not exist or has syntax error

can anyone helping me? im stuck
Asyiq M
  • 13
  • 5
1
vote
3 answers

Yii2: GridView's column is too wide

I have index.php made by the Gii tool that created a CRUD. Also I use AdminLTE template. It has the GridView that should show two columns: "Phrase" and "Author" but the column "Phrase" has some rows with long text (around 350 characters) so just a…
Roby Sottini
  • 2,117
  • 6
  • 48
  • 88
1
vote
3 answers

Gii doesn't load in custom build of Yii2

I'm using the Foundationize custom build of Yii2, which is a couple of years old but in general seems to run just fine. However, when I've come to run the gii tool for generating new models etc. the routing is ignored and my application's index page…
G Hughes
  • 21
  • 3
1
vote
1 answer

Gii Extension for Laravel

I need a tool like Gii Extension for Laravel but I can't find it. This extension provides a Web-based code generator, called Gii, for Yii 2 applications. You can use Gii to quickly generate models, forms, modules, CRUD, etc. Here is some images:
Roby Sottini
  • 2,117
  • 6
  • 48
  • 88
1
vote
2 answers

Yii generate model without Gii

I need to generate a model file without the use of Gii. Are there any command Yii? $table = "myTable"; Yii::app()->generateModel($table); // ?
Ivošš
  • 1,106
  • 12
  • 18
1
vote
1 answer

How to generate relations between tables

How can I use Gii to create relations between the tables? Should I create them first in my database or they will be generated automatically?
Afaf
  • 654
  • 1
  • 5
  • 17
1
vote
1 answer

Using Gii with SQL Server

I have two DB within my Yii2 Application. I'm trying to use Gii to generate models for SQL-Server 2008. But I keep getting: Connection does not support reading schema information for 'sqlsrv' DBMS. I am able to connect to the DB and pull data and…
Jonnny
  • 4,939
  • 11
  • 63
  • 93
1
vote
1 answer

Yii2 - Making dropdown list from db structure not the the inserted data in db

I have a form page that one of the field is named type and it's enum('lost', 'found') and in this form, I want that field to be a dropdown list that only has these two options lost and found. one of the suggested options was using this in view
Amir
  • 523
  • 1
  • 5
  • 24
1
vote
2 answers

Add custom model template using yii2 giiant

I am trying to use my own set of templates to generate cruds and models with giiant by Tobias Munk and folowing: https://github.com/schmunk42/yii2-giiant/blob/master/docs/32-customizations.md but I cant make it work. First I copy the…
open-ecommerce.org
  • 1,763
  • 1
  • 25
  • 41