Created about a year ago by Kartik V – Tips – 1 comment – viewed 22,192 times
( +42 / -5 )
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
Generally we need to show one or more fields from a model that is related to another model used in CGridView.
For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".