Exemplo n.º 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]);
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public static function getAllWebsites()
 {
     $websites = Website::find()->limit(15)->all();
     return $websites;
 }
Exemplo n.º 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]);
 }