Wiki

Sorted by commentsX
Displaying 101-110 of 782 result(s).

How to automate timestamps in ActiveRecord models

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

Using counters with ActiveRecord

Created 5 years ago by davi_alexandreTips9 comments – viewed 28,408 times – ( +14 / -1 ) – version 1.1
Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).

Render Form in popup via AJAX (Create and Update) with ajax validation & Also load any page via ajax Yii 2.0 (2.3)

Created about a year ago by skwordenHow-tos9 comments – viewed 91,418 times – ( +26 ) – version 2.0
There are a few issues with the other solutions I originally used that I found from other wikis. I address the issues I had in this much simpler and shorter way. I am also going to explain what is going into way more detail than others to help people understand what's going on.

Exporting CGridView results to CSV file

Created 4 years ago by RusAlexTutorials9 comments – viewed 44,870 times – ( +6 / -3 ) – version 1.1
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
tags: cgridview, export, csv

Creating a database-driven hierarchical Structure combined with CMenu and superfish

Created 6 years ago by thyseusTutorials9 comments – viewed 47,957 times – ( +15 ) – version 1.1
Note: Please also take a look at the newer EMenu extension. This works even better that the deprecated CDropDownMenu!
tags: menu

Events explained

Created 4 years ago by pligorTutorials9 comments – viewed 36,849 times – ( +22 / -3 ) – version 1.1
Let's see what exactly are the events in Yii!

Caching strategy

Created 3 years ago by darkheirHow-tos9 comments – viewed 6,547 times – ( +5 / -1 ) – version 1.1
Note: Before reading this wiki you should have read the caching part in the Yii guide
tags: caching, filter

A Multi-Tenant Strategy using Yii and MySQL

Created 2 years ago by JFReyesHow-tos9 comments – viewed 21,613 times – ( +10 ) – version 1.1
This article describes an implementation of multi-tenancy using Yii and MySQL.

Update CGridview row separately using ajax request

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos9 comments – viewed 14,350 times – ( +7 ) – version 1.1
There are cases you want to update a record on CGridview directly

A simple action for CJuiAutoComplete

Created 5 years ago by tydeas_drTips9 comments – viewed 37,369 times – ( +17 / -1 ) – version 1.1
More or less I use auto-complete field for a form. CJuiAutoComplete is a yii widget for this purposes. The common use case is to make an ajax request and retrieve a list from the database. So in this case you have to write a controller action to return you a json encoded list. What if I had a generic action to do this work for me?