What is the render function you're trying to call? It's saying that it's not set.
May 5, 2015
11
Level 3
Pagination in L5
I have this code :
$status = statuses::whereIn('uid', $following)->with('user')->latest()->paginate(5);
In blade :
{{ $status->render() }}
Showing this error :
Call to undefined method Illuminate\Database\Query\Builder::render() (View: C:\xampp3\htdocs\resources\views\home.blade.php)
Level 3
Ah !!! I got the problem, Problem was in foreach loop. I passed status in view
return view('home',compact('status'));
And then I used foreach loop:
@foreach($status as $status)
I had no problem of accessing elements using $status variable however when I user
{{ $status->render() }}
It doesn't work So, I just needed to change foreach to :
@foreach($status as $statuses)
Anyway Thanks guys for quick help :-)
Please or to participate in this conversation.