Hello!
Is it possible to implement, as in https://www.yiiframework.com/doc/api/CActiveRecord#scopes
class Post extends CActiveRecord { … public function scopes() { return array( 'published'=>array( 'condition'=>'status=1', ), 'recently'=>array( 'order'=>'create_time DESC', 'limit'=>5, ), ); } }
$posts=Post::model()->published()->recently()->findAll();