How to create Model in Yii2 using Gii tool

Posted by in Yii 2

First of all, you should install yii2 to follow these steps. After installation, you can then access Gii tool through the following URL: http://localhost/path/to/index.php?r=gii [eg: http://localhost/yii2advanced/frontend/web/index.php?r=gii] If you have enabled pretty URLs, you may use the following URL: http://localhost/path/to/index.php/gii [eg: http://localhost/yii2advanced/frontend/web/index.php/gii] possible errors: Page Not Found, Unable to resolve the request gii solution: check whether the gii module is enabled in @app/frontend/config/main-local.php

  Model Generator This generator generates an ActiveRecord class for the specified database table. Click “start” button under model generator to create Models. Before that, create table…read more


How to install yii2.0 basic and advanced application using composer and archived files

Posted by in Yii 2

Currently, there are two Yii 2.0 application templates available: Basic Application Template – a basic frontend application template. Advanced Application Template – consisting of a frontend, a backend, console resources, common (shared code), and support for environments. Before Installation: Make sure you are using php version > php 5.4, if not upgrade it. To enable or recompile php with openssl, Find line ;extension=php_openssl.dll in C:\wamp\bin\php\php.version\php.ini and uncomment it by removing the semicolon (;) from the beginning of the line. Note: WAMP uses different php.ini files in the CLI and for Apache. when you enable php openssl through…read more