名前空間 app\index\controller;
app\index\model\Teacher を TeacherModel として使用;
think\Request を使用;
app\index\model\Grade を使用;
クラス Teacher を拡張Base
{
//教師リスト
public function TeacherList()
{ //すべての教師テーブルの教師データを取得
$Teacher = TeacherModel::all();
//レコード数を取得する
$count = TeacherModel::count();
- - ## 'ID' = & gt; $ value-& gt; id, // メインキー
'name' = & gt; $ value- & gt; name, // 名前
'degree' = & gt; $ value- & gt ;degree, //Education## # 'school' => hiredate '=> $ value-> hiredate、// inging time
' status '=> table data; unallocated</span>'、
$this -> view -> assign('TeacherList', $TeacherList);
$this -> view -> assign('count', $count);
//現在のページの SEO テンプレート変数を設定します
$this->view->assign('title','edit class');
$this->view->assign('キーワード' ,'php.cn');
、、、、、、、、、、できません、 -> fetch('Teacher_list');