Example #1
0
 public function actionView($id)
 {
     $model = $this->findModel($id);
     if (!$model) {
         throw new NotFoundHttpException();
     }
     $user = \api\models\User::findOne($model->domain_id);
     $user = $user ? $user->username : '';
     return $this->render('view', ['model' => $model, 'user' => $user]);
 }