コード例 #1
0
 public function init()
 {
     parent::init();
     $this->content_type = 'post';
     $this->bodyClass = ContentPost::className();
     $this->pageSize_index = 10;
 }
コード例 #2
0
 public function getDetail($id)
 {
     $model = Content::getBody(ContentPost::className(), [
         'a.id' => $id
     ])->one();
    
     return [
         'model' => $model
     ];
 }