예제 #1
0
 public function actionIndex()
 {
     // remove all sessions when come back list page
     Yii::$app->session->removeAll();
     $websites = Website::find()->orderBy('id DESC')->all();
     return $this->render('index', ['websites' => $websites]);
 }
예제 #2
0
 function websiteName()
 {
     $result = Website::find()->orderBy('WebsiteTitle')->distinct(true)->select('WebsiteTitle')->all();
     $type = array();
     $ind = 0;
     foreach ($result as $value) {
         $type[$ind++] = $value->WebsiteTitle;
     }
     return $type;
 }
예제 #3
0
 public static function getAllWebsites()
 {
     $websites = Website::find()->limit(15)->all();
     return $websites;
 }
예제 #4
0
 public function actionIndex()
 {
     $count = ['clients' => count(Client::find()->all()), 'websites' => count(Website::find()->all()), 'checklists' => count(Checklist::find()->all()), 'messages' => count(Message::find()->all())];
     return $this->render('index', ['count' => $count]);
 }