Home  >  Q&A  >  body text

Why can't the list be rendered?

namespace app\index\controller;
use app\index\model\Teacher as TeacherModel;
use think\Request;
use app\index\model\Grade;
class Teacher extends Base
{
//Teacher list
public function teacherList()
{ //Get all teacher table teacher data
$teacher = TeacherModel::all();

              //Get the number of records
                                  $count =         TeacherModel::count();
                                                                                                     ‐                 ‐        ‐ of's'''''‑‑        ## 'ID' = & gt; $ value-& gt; id, // main key
'name' = & gt; $ value- & gt; name, // name
'degree' = & gt; $ value- & gt ;degree, //Education
                    'school' => hiredate' => $value->hiredate, //Joining time
                      'status' => Table data ;Unallocated</span>',
                                                                                                                                                                  

            $this -> view -> assign('teacherList', $teacherList);
          $this -> view -> assign('count', $count);

//Set the seo template variables of the current page
$this->view->assign('title','edit class');
$this->view->assign('keywords' ,'php.cn');
                                                                                                                                                                                            ,,,,,,,,,, can't, -> fetch('teacher_list');

}



尾生尾生2063 days ago1186

reply all(0)I'll reply

No reply
  • Cancelreply