/** * Finds the Personal model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Personal the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Personal::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
echo Yii::$app->user->identity->username; ?> </span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header"> <img src="<?php echo $directoryAsset; ?> /img/user2-160x160.jpg" class="img-circle" alt="User Image"/> <p> <?php echo Personal::findOne(Yii::$app->user->identity->id)->firstname . ' ' . Personal::findOne(Yii::$app->user->identity->id)->lastname; ?> <small>สร้างเมื่อ <?php echo date('Y-m-d', User::findOne(Yii::$app->user->identity->id)->created_at); ?> </small> </p> </li> <!-- Menu Footer--> <li class="user-footer"> <div class="pull-left"> <?php $id = Yii::$app->user->identity->id; $route = Url::to(['/personal/personal/view', 'id' => $id]); ?> <a href="<?php