问答详情
源自:2-3 Laravel-表单列表及分页实现

分页展示问题

分页报一下错误

https://img2.mukewang.com/5b05255400016b1d09440219.jpg

https://img1.mukewang.com/5b05256a0001eef405360113.jpg

提问者:qq_范儿小青年_0 2018-05-23 16:26

个回答

  • L_yeluo
    2018-10-25 03:42:26

    list 是数组   student_all 是对象  students是key   对象才有方法

  • L_yeluo
    2018-10-25 03:40:11

    {{$student_all -> render()}}

  • 戴熠宸
    2018-05-28 20:18:29

    原因:上面的foreach中$students与下面分页的$students冲突,可把上面的foreach中的$students as $students改成$students as $key,然后$students->id改成$key->id,依次类推

  • qq_范儿小青年_0
    2018-05-23 16:58:37

    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()


  • qq_范儿小青年_0
    2018-05-23 16:46:32

    https://img1.mukewang.com/5b052a54000181b404680404.jpg

    帮忙解决一下啊