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