anjanesh's avatar

$posts->links() is hidden by default

app/Http/Controllers/CompanyController.php

$companies = Company::latest()->paginate(5);

resources/views/company/index.blade.php

    <div>
        {{ $companies->links() }}
    </div>

There are 7 items and there should be pagination (2 pages) - which exist in the nav's DOM. For some reason the child DIVs of nav are hidden. Alt text

Why is this hidden automatically ? Is there a way for me to override this ?

Using TailWind CSS 3.1.7

0 likes
1 reply
ramonrietdijk's avatar
Level 30

One of these two div elements should always be visible according to their class list. However, since this is not happening, your Tailwind configuration is likely not scanning this file to search for classes as it is located in the vendor.

./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php

This can be fixed by adding this file to your Tailwind configuration.

Although your pagination may be working at this point, you still can't make tweaks. I would recommend publishing the pagination views and make any additional changes you wish. Using this approach, you will have full control over the layout and are not required to make any changes to your Tailwind configuration.

Please or to participate in this conversation.