I rewrote the code a bit, so that it conforms to my existing code, and so that it's also a tiny bit more readable.
However my problem has not been solved yet, this should be straightforward, but for some reason I don't know how to solve it. The issue is still that the page is NOT paginated (and the links are not showing up).
public function show($name) {
$listings = Listing::where('category_id', '=', $name)->paginate(10);
$category = Category::wherename($name)->firstOrFail();
return View::make('categories.categories-view', compact('listings', 'category'));
}
My view:
<section id="pagination" class="pagination">
{{ $listings->links() }}
</section>
Any help is appreciated :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community