milar's avatar
Level 1

laravel pagination links not working

I was using a bootstrap 5 template within my Laravel project. Now in the data table, I have created pagination links that appear really weird and it seems nothing can fix them. What can be done in this case?

Controller

public function index()
{
    $categories = Category::query();
    if($keyword = request('search')) {
        $categories->where('title' , 'LIKE' , "%{$keyword}%");
    }
    $categories = $categories->latest()->paginate(25);
    return view('Admin.categories.index' , compact('categories'));
}

index.blade.php

{!! $categories->links() !!}

pagination

0 likes
5 replies
sevenTopo's avatar

try to past this code in a blank blade page without css / js assets , maybe it affects the normal laravel pagination template

Please or to participate in this conversation.