源自:2-3 Laravel-表单列表及分页实现
分页展示问题
分页报一下错误


提问者:qq_范儿小青年_0
2018-05-23 16:26
个回答
-
list 是数组 student_all 是对象 students是key 对象才有方法
-
{{$student_all -> render()}}
-
原因:上面的foreach中$students与下面分页的$students冲突,可把上面的foreach中的$students as $students改成$students as $key,然后$students->id改成$key->id,依次类推
-
ErrorExceptionin Builder.php line 2405:
Call to
undefined method Illuminate\Database\Query\Builder::render() (View:
E:\phpStudy\WWW\laravel\resources\views\student\index.blade.php)
BadMethodCallExceptionin Builder.php line 2405:
Call to undefined method Illuminate\Database\Query\Builder::render()
-

帮忙解决一下啊