masal ke tor pay mery pass two models hean propery and category ager mean property ke form per category ke dropdwon show karna chata hon to ye kass hoga
for example mean nay category ke modle mean aik functin banay hea like
public function getCategoryList()
{
$c= new CDbCriteria;
$c->select = 'catId, catName';
$c->from = 'af_categories';
$c->order = 'catName ASC';
$category = Categories::model()->findAllByPk($c);
return $category;
}
Dossri baat ya hia ky app ko model ka jo function app call kr rahay hian wo (getStateList()) hia jub ky jo function app uper kh rahay hian wo getCategoryList hia.
main ya suggest krta hon ky app es ko es terha sy kr lian
Aur ager app phr b relation sy ($model->categories->getCategoriesList()) sy krna cha rahay hian to us ka sahi code kuch youn banta hia
// function in categories model
public function getCategoryList()
{
$c= new CDbCriteria;
$c->select = 'catId, catName';
$c->from = 'af_categories';
$c->order = 'catName ASC';
$category = Categories::model()->findAll($c);
return $category;
}
bhai muze yii2 me uploadify liabrary used karni hai iska process kya hai .kue ki mai cmd se use upload karta hu to woh token hidden ka error deta hai please help me. mai yyi development me naya hu