Wiki

Sorted by commentsX
Displaying 91-100 of 771 result(s).

Behaviors & events

Created 6 years ago by pestaaTutorials10 comments – viewed 119,186 times – ( +52 ) – version 1.1
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.

Getting the Most out of APC for Yii

Created 4 years ago by Da:SourcererHow-tos10 comments – viewed 35,102 times – ( +17 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Display an AJAX tree from your DB using CTreeView

Created 6 years ago by Fran̤ois GannazTutorials10 comments Рviewed 54,233 times Р( +21 ) Рversion 1.1
This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).
tags: AJAX, CTreeView

Creating and updating model and its related models in one form, inc. image

Created 3 years ago by BoazHow-tos10 comments – viewed 78,015 times – ( +6 / -3 ) – version 1.1
We start slowly and simple...

How to implement cron in Yii 2

Created 2 years ago by hemcHow-tos10 comments – viewed 34,233 times – ( +10 ) – version 2.0
In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.
tags: cron, yii2, console

Single sign on across multiple subdomains

Created 5 years ago by ianar̩How-tos10 comments Рviewed 40,673 times Р( +32 ) Рversion 1.1
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

Using Yii with Nginx and PHP-FPM

Created 5 years ago by LericHow-tos10 comments – viewed 54,581 times – ( +18 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

Creating a CSS Driven Drop Down Menu using CMenu

Created 4 years ago by blindMoeHow-tos10 comments – viewed 81,615 times – ( +22 / -1 ) – version 1.1
CMenu offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.

RBAC Super Simple with Admin and User

Created about a year ago by evercodeTutorials9 comments – viewed 40,980 times – ( +14 / -3 ) – version 2.0
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for developing your own features or move on to Yii 2's RBAC.

How to automate timestamps in ActiveRecord models

Created 7 years ago by dalipTutorials9 comments – viewed 137,346 times – ( +32 ) – version 1.1
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here: