This is how i do before query on Yii 2.0
This is how i do before query on Yii 2.0
Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.
In this article I will show you how to slightly increase application security, by exploiting the fact that Yii implements the Front Controller Pattern.
1. Create Extension in yii2.
I leverage Kartik's notification widgets.
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.
This behavior enable you to command the RBAC via console. This avoids you to install a entire rbac graphic toolkit to set up some rules in the rbac, maybe you are running inside a ssh console.
When one needs to select a record in a table that do not have related records through a relation, it is generally suggested to use a subquery. Personnaly, I prefer a high level approach, and I have a method to do it with scopes.
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:
Finding good looking, working and not abandoned gallery manager for Yii 1.x application is a tough task. Out of all I found, only yii-gallery-manager extension looked promising. But, after downloading it, it turned out, that there are certain unusual things to do, to include it in your application. So, I decided to write this article...
Then, we write this in the config > main.php:
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.
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
I'm using PayPal's script from
I faced many issues when hosted our company website on AppFog.
MailGun.php Class
This tutorial is explained following "basic" application structure.