30 lines
675 B
PHP
30 lines
675 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Controllers;
|
||
|
|
|
||
|
|
use App\Models\DictTestModel;
|
||
|
|
use App\Models\DictDeptModel;
|
||
|
|
|
||
|
|
class Test extends BaseController
|
||
|
|
{
|
||
|
|
protected $dictTestModel;
|
||
|
|
protected $dictDeptModel;
|
||
|
|
|
||
|
|
public function __construct()
|
||
|
|
{
|
||
|
|
$this->dictTestModel = new DictTestModel();
|
||
|
|
$this->dictDeptModel = new DictDeptModel();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function index()
|
||
|
|
{
|
||
|
|
return view('test/index', [
|
||
|
|
'title' => 'Test Dictionary',
|
||
|
|
'tests' => $this->dictTestModel->getWithDept(),
|
||
|
|
'depts' => $this->dictDeptModel->findAll(),
|
||
|
|
'active_menu' => 'test',
|
||
|
|
'page_title' => 'Test Dictionary'
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|