Added: favicon, Dashboard, Habits list, some styles, dashboard redirect
This commit is contained in:
16
app/controllers/DashboardController.php
Normal file
16
app/controllers/DashboardController.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
class DashboardController extends Controller {
|
||||
public function index() {
|
||||
$habit = new Habit();
|
||||
$habits = $habit->getHabitsByUser($_SESSION['user']['id']);
|
||||
|
||||
$this->view('dashboard/index', [
|
||||
'title' => 'Dashboard',
|
||||
'habits' => $habits,
|
||||
]);
|
||||
}
|
||||
|
||||
public function reroute(){
|
||||
$this->redirect('/dashboard');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user