43 lines
819 B
PHP
43 lines
819 B
PHP
<?php
|
|
|
|
namespace App\Controllers\home;
|
|
|
|
use App\Controllers\BaseController;
|
|
use App\Models\Home\HomeModel;
|
|
|
|
class Home extends BaseController
|
|
{
|
|
private $homeModel;
|
|
|
|
private $sdate = '';
|
|
private $edate = '';
|
|
public function __construct()
|
|
{
|
|
|
|
$this->sdate = date('Y-m-d', strtotime('-1 month'));
|
|
$this->edate = date('Y-m-d');
|
|
|
|
$this->homeModel = new HomeModel();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
|
|
}
|
|
|
|
public function dashboard(): string
|
|
{
|
|
|
|
$notice = $this->homeModel->getNoticeList();
|
|
$statistics = $this->homeModel->getHomeStatistics($this->sdate, $this->edate);
|
|
|
|
|
|
return view('pages/home/dashboard', [
|
|
'menus' => $this->data,
|
|
'notice' => $notice,
|
|
'statistics' => $statistics,
|
|
]);
|
|
}
|
|
|
|
}
|