To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.
To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.
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.
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().
A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.
Stores session data in database and transfer data when session is destroy. Uses for check users online, user's last activity and last ip.
Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.
Consider the following use case:
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at ma...
Like gmail, if you have tree or more unsuccessful login attemps a captcha appears
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?
typical scenario: invoice, invoice items.
Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.
In this wiki I will show how could wo pass the third parameter to UserIdentity on login authenticate. So we can do separate login authentcation from two or more different models from single login form.
I am going to show you an effective way to validate the uniqueness of multiple columns.
Then, we write this in the config > main.php:
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.
There are cases that you want to validate the file format, size, extension etc but how to do that without submit the form ?
Suppose you have an Application in Yii that manages hotels each one has many customers.