Video Tutorial //m.sbmmt.com/course/631.html In Chapter 5, Section 3, use paging to display classification information. In this video,
according to the video Write $cate_list=Menu::paginate(10); when used on the template page, it will prompt that the attribute of class
does not exist: app\menu\model\Menu->id
The namespace and think references are the same as in the previous section
$cate=Menu::getTree(); You can use
$cate_list= on the template page Menu::paginate(10); will report an error when used in a template
menu:: is the class Menu in the model and is written in the controller as Menu::method();
$cate_list=Menu::paginate(10);
I don’t know what the Menu here is.
The object must be obtained before calling paginate(10), that is to say You need to query first and then paginate the result objects