$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.