where(['id' => 1]) ->one(); foreach($accountsModel as $account){ //var_dump($account->name); } var_dump($accountsModel->name); die(); return $this->render('apitest'); } }