Skip to content

Commit 85e1d5c

Browse files
committed
create account admin and user in main panel with working action
1 parent daf65ac commit 85e1d5c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

controllers/UserController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ class UserController extends Controller {
99
public function actionIndex() {
1010
return $this->render('index');
1111
}
12+
13+
public function actionAdmin() {
14+
return $this->render('admin');
15+
}
1216
}

views/layouts/main.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
echo Nav::widget([
3939
'options' => ['class' => 'navbar-nav navbar-right'],
4040
'items' => [
41-
['label' => 'Аккаунт админа', 'url' => ['/user/admin']]
41+
['label' => 'Аккаунт админа', 'url' => ['/user/admin']],
42+
['label' => 'Аккаунт пользователя', 'url' => ['/user/index']]
4243
],
4344
]);
4445
NavBar::end();

views/user/admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Новости</h1>

0 commit comments

Comments
 (0)