mah.tab
سه شنبه 30 اردیبهشت 1393, 23:35 عصر
سلام
من برای اینکه فقط کاربران عضو سایت بتونن برای پست ها کامنت بزارن, رلیشن ها رو اینگونه تغیر دادم, ولی باز کار نکرد
یک سؤال هم دارم که آیا هنوز برای خرید مجموعه آموزشی, شماره حساب ها و شماره پیامک فعال میباشد؟
models/post.php
public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'author' => array(self::BELONGS_TO, 'User', 'author_id'), 'comments' => array(self::HAS_MANY, 'Comment', 'post_id', 'condition'=>'comments.status='.Comment::STATUS_APPROVED, 'order'=>'comments.create_time DESC'), 'commentCount' => array(self::STAT, 'Comment', 'post_id', 'condition'=>'status='.Comment::STATUS_APPROVED), ); }
من برای اینکه فقط کاربران عضو سایت بتونن برای پست ها کامنت بزارن, رلیشن ها رو اینگونه تغیر دادم, ولی باز کار نکرد
یک سؤال هم دارم که آیا هنوز برای خرید مجموعه آموزشی, شماره حساب ها و شماره پیامک فعال میباشد؟
models/post.php
public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'author' => array(self::BELONGS_TO, 'User', 'author_id'), 'comments' => array(self::HAS_MANY, 'Comment', 'post_id', 'condition'=>'comments.status='.Comment::STATUS_APPROVED, 'order'=>'comments.create_time DESC'), 'commentCount' => array(self::STAT, 'Comment', 'post_id', 'condition'=>'status='.Comment::STATUS_APPROVED), ); }