Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 71-80 of 314 result(s).

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Created 5 years ago by mindehHow-tos5 comments – viewed 25,102 times – ( +44 ) – version 1.1
Original source code and idea are from: PHP, PDO & Nested Transactions.

How to hide /frontend/web in url addresses on apache

Created 22 days ago by raminiousHow-tos6 comments – viewed 24,970 times – ( +8 ) – version 2.0
There is an issue on Yii2 to redirecting / urls to /frontend/web. In other words we need a way to hidden /frontend/web from addresses. We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

Integrating HybridAuth directly into Yii without an extension

Created about a year ago by biz devHow-tos7 comments – viewed 24,761 times – ( +14 ) – version 1.1
This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

Sort and filter a custom or composite CGridView column - that may even contain data from different tables.

Created 11 months ago by Gerhard LiebenbergHow-tos1 comment – viewed 24,666 times – ( +4 / -1 ) – version 1.1
I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.

Simple authorization system

Created 2 years ago by GustavoHow-tos1 comment – viewed 24,397 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

How to use an application behavior to maintain runtime configuration

Created 3 years ago by zaccariaHow-tos3 comments – viewed 24,363 times – ( +27 ) – version 1.1
In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 2 years ago by c@cbaHow-tos3 comments – viewed 24,343 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

Single table inheritance

Created 3 years ago by samdarkHow-tos7 comments – viewed 23,471 times – ( +39 ) – version 1.1
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field of the same table.

Kickstart development with Yii-App

Created about a year ago by Chris83How-tos24 comments – viewed 23,209 times – ( +21 / -1 ) – version 1.1
I recently created a project called Yii-App on GitHub to kickstart my development of smaller Yii applications. The main goal of the project is to provide a ready-to-use application template that includes my bootstrap extension and many other useful extensions. After reading this article you will be able to use this project as a starting point for all of your Yii projects.

Authenticating against phpass hashes with Yii

Created 3 years ago by Da:SourcererHow-tos18 comments – viewed 23,080 times – ( +26 ) – version 1.1
Note: This guide is outdated as of Yii v1.1.14 which introduced the CPasswordHelper class. Please use that instead.