samedi 26 mars 2016

Method render does not exist laravel pagination

$page = Question::paginate(10);
dd($page);

Here the pagination working very well but when i use pagination with other models relations then its produce the paginate result but pagination links not appear because its produce error

 $questions = Course::with(['questions' => function($query){
                $query->paginate(10);
            },'questions.subjects','questions.years'])
            ->where("status",1)
            ->where(function ($query) use ($course) {
                $query->orWhere('course', '=', $course)
                    ->orWhere('slug', '=', $course);
            })->get();

ERROR :

 BadMethodCallException in Macroable.php line 81:
    Method render does not exist.

What is missing here.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire