Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 131-140 of 350 result(s).

Alternative folder structure for a standard Yii app

Created 3 years ago by TrejderHow-tos4 comments – viewed 12,724 times – ( +5 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

Client-side form validation using Twitter Bootstrap's Popovers

Created 3 years ago by TrejderHow-tos4 comments – viewed 35,151 times – ( +4 / -1 ) – version 1.1
This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.

defaultScope

Created 3 years ago by Gerhard LiebenbergHow-tos4 comments – viewed 19,518 times – ( +5 / -1 ) – version 1.1
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

Write & use a custom Component in Yii2.0

Created about a year ago by sirin kHow-tos4 comments – viewed 41,391 times – ( +16 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

How to implement form events

Created about a year ago by Antonio RamirezHow-tos4 comments – viewed 11,658 times – ( +6 ) – version 2.0
You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.
tags: yii2, forms, how to

How to keep filters simple in CGridView

Created about a year ago by PeppeHow-tos3 comments – viewed 4,859 times – version 1.1
The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.

How to re enable logging during unit testing

Created 4 years ago by AsgarothHow-tos3 comments – viewed 14,516 times – ( +11 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

yii2-app-advanced on single domain (Apache, Nginx)

Created about a year ago by MadAndHow-tos3 comments – viewed 32,736 times – ( +9 ) – version 2.0
If you develop rather complex applications with Yii2, you might already be familiar with yii2-app-advanced application template. Well, the template is awesome and provides high flexibility regarding code/configuration sharing among parts of an application.

Multiple CGridView virtual attributes, retrieved from a single model function. Also communication between CGridView columns and rows; and between CGridView and its own parent view.

Created about a year ago by Gerhard LiebenbergHow-tos3 comments – viewed 5,046 times – ( +1 ) – version 1.1
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:

Secure password hashing with bCrypt

Created 4 years ago by waitforitHow-tos3 comments – viewed 22,624 times – ( +9 ) – version 1.1
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.