Suppose you have Products,Categories and each product belongs in many categories
Suppose you have Products,Categories and each product belongs in many categories
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/
In this wiki I will show you how to save/update a model with many related model For example: How to set a product to multiple categories only in one post form ?
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.
Note the tag {{homeUrl}}
will be dynamically replaced at runtime.
The only differences in Yii 2 is that its much simpler due to available functions in the Model class for loading and validating models.