What to do with Laravel pagitation problem?

Viewed 40

The next problem

$quotes=Quote::wherein('id', [12,13,14,15,16])->paginate(3);
return view ('quotes_by_categories', ['quotes'=>$quotes]);

here's everything works but

      $quotes = Quote::whereHas('themes', function($q)
        {
          $q->wherein('thema', ['txt1', 'txt2', 'txt3']);
        })->paginate(3);
return view ('quotes_by_categories', ['quotes'=>$quotes]);

-- blank page in view. When i make dump - the result of first and second request is the same, everything is ok. Where is the problem?

1 Answers

try

return view('quotes_by_categories',compact('quotes'))
Related