tinyqc/app/Controllers/Control.php

37 lines
1012 B
PHP
Raw Normal View History

<?php
namespace App\Controllers;
use App\Models\DictControlModel;
use App\Models\ControlTestModel;
use App\Models\DictDeptModel;
use App\Models\DictTestModel;
class Control extends BaseController
{
protected $dictControlModel;
protected $controlTestModel;
protected $dictDeptModel;
protected $dictTestModel;
public function __construct()
{
$this->dictControlModel = new DictControlModel();
$this->controlTestModel = new ControlTestModel();
$this->dictDeptModel = new DictDeptModel();
$this->dictTestModel = new DictTestModel();
}
public function index(): string
{
return view('control/index', [
'title' => 'Control Dictionary',
'controls' => $this->dictControlModel->getWithDept(),
'depts' => $this->dictDeptModel->findAll(),
'tests' => $this->dictTestModel->getWithDept(),
'active_menu' => 'control',
'page_title' => 'Control Dictionary'
]);
}
}