This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not
This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not
A simple trick to get the localized version of a model field is to add this little method to your models.
But in the supposedly small share of webapps that don't ask users to activate their accounts, you can end up with a number of bounce messages and non-accessible active accounts.
In Yii community we have lots of extention can send emails, such as YiiMailer and Swift and so on, or even IMAPI, thanks for team contribution. However, sometimes, in the intranet enviroment, the program cannot run successfully since SMTP /IMAP port been banded. So you need to seek other ways. The most simple way is call outlook as COM.
This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.
I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem>
is different from null as it represents an empty string. Also, although some use <elem/>
to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the eleme...
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.
In this wiki I will show how to Disallowing login from multi places. User can login or access their account at time, only single place.
It's easy to execute migration locally on XAMPP using cmd, but on server where you script is it's little bit harder.
First of all this is a very common problem, for more details see this post http://www.yiiframework.com/forum/index.php/topic/52052-upload-file-with-any-charset/
Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer
based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...
This is how i do before query on Yii 2.0
When I used CJuiTabs I did something. They are
Yii's CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an...
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.
In application development we often have to choose how to mange recurrent values.
Hi friends,
PHPIDS is a well known project that can be found in php-ids.org.
This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.
To get null
from database instead of empty strings you need to set up your DB connection as follows: