Yii2 Framework

Yii2 Case Study (1) : Angular JS

This is an example how to combine Yii2 with AngularJS. We have one table, game. 1. Table Preparation Table game : Create model Game.php using Gii, put it in common\models folder.

2. Create GameController.php, index.php, app.js and Use AngularJS 1.6 create frontend/controllers/GameController.php

create frontend/views/game/index.php Use AngularJS 1.6, and put https://ajax.googleapis.com/ajax/libs/angularjs/1.6.7/angular.min.js inside this file.

Read more about Yii2 Case Study (1) : Angular JS[…]

Yii2 Framework

Yii2 Tips 28 : Dependent Dropdown Without Extension

This tip will show you how to create dependent dropdown without using any extensions. 1. Create table country and table city. 2. Create models Country and City using gii. 3. Add actionDependentDropdown on your controller (i.e. TestController.php)

4. Add the view file, dependent-dropdown.php inside the view folder, take note to the ‘onchange’ event when the Read more about Yii2 Tips 28 : Dependent Dropdown Without Extension[…]

Yii2 Framework

Yii2 Tips 27 : Import Data from Excel

1. Install yii2 export

2. Excel file , i.e (take note on the baseRow and baseColumn) : 3. Create table and the model

4. Put actionImport (or whatever the name is), to your controller

5. Create import.php

Yii2 Framework

Yii2 Tips 26 : All About Gridview

This is my personal notes on Gridview and their tips. First, I have gridview table with the following structure and content : Next step is to create the GridviewModel model and the CRUD using Gii. A. Gridview Tips : Dropdown Search using Kartik Gridview The end result will be like this, there is dropdown list Read more about Yii2 Tips 26 : All About Gridview[…]

Yii2 Framework

Yii2 Tips 25 : All About Form Validation