Getting error on tailwind pagination

I have a problem with the tailwind pagination view(https://laravel-news.com/laravel-7-13-0).
If I first try to find something out in my users table and click on the next page I get the following error message:

The GET method is not supported for this route. Supported methods: POST.

The code that I have written is very simple:

class UsersTable extends Component
{
use WithPagination;

public $search = '';
public $perPage = 10;

public function render()
{
    return view('livewire.users-table', [
        'users' => User::search(
            $this->search
        )->paginate($this->perPage)
    ]);
}
}

and this is how Iā€™m displaying tailwind pagination:

{{ $users->links('vendor.pagination.tailwind') }}

Here are some screenshots:

Check your console for errors, you might be missing @livewireScripts on that page. I had this error pop up because of a CORS issue before.

1 Like

How about this issue? Solved or not? I have a same problem now in livewire 2.x

This error occurs because pagination submits data to a get route. Using Livewire we submit data as Ajax post request. so we cannot call a post route via default get Call. I am writing some code to have custom pagination with bootstrap

1 Like