- CodeIgniter 4 framework setup with SQL Server database config - Models: Control, Test, Dept, Result, Daily/ Monthly entry models - Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints - Views: CRUD pages with modal dialogs, dashboard, reports - Database: Migrations for control test and daily/monthly result tables - Legacy v1 PHP application preserved in /v1 directory - Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
26 lines
523 B
PHP
26 lines
523 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
use App\Models\DictDeptModel;
|
|
|
|
class Dept extends BaseController
|
|
{
|
|
protected $dictDeptModel;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->dictDeptModel = new DictDeptModel();
|
|
}
|
|
|
|
public function index(): string
|
|
{
|
|
return view('dept/index', [
|
|
'title' => 'Department Dictionary',
|
|
'depts' => $this->dictDeptModel->findAll(),
|
|
'active_menu' => 'dept',
|
|
'page_title' => 'Department Dictionary'
|
|
]);
|
|
}
|
|
}
|