i´m trying to create table with dynamic pagination. When i select my pagination number, i´m doing petition to my API and in my query ->paginate($param) i receive my data to paginate. This params it´s received correctly, but my problem it´s that i can´t draw my links. For build this, i´m using this [library][1] and i haven´t got any warnings or problems in my console. My actual code is:
My form:
const links = ref({})
const resp = await axios.get(`/api/listingApi/getRegister/${param_search.value["parameter"]}/${param_search.value["value"]}`)
registers.value = resp.data.data
links.value = resp.data.links
<nAsignedCalls :valor="registers" :links="links"/>
I´m getting this data from my API
links: {first: "http://www.crm.local:8081/api/listingApi/getRegister/cp/18519?page=1",…}
first: "http://www.crm.local:8081/api/listingApi/getRegister/cp/18519?page=1"
last: "http://www.crm.local:8081/api/listingApi/getRegister/cp/18519?page=6"
next: "http://www.crm.local:8081/api/listingApi/getRegister/cp/18519?page=2"
prev: null
meta: {current_page: 1, from: 1, last_page: 6,…}
current_page: 1
from: 1
last_page: 6
links: [{url: null, label: "« Previous", active: false},…]
path: "http://www.crm.local:8081/api/listingApi/getRegister/cp/18519"
per_page:30
to: 30
total: 160
[1]: https://laravel-vue-pagination.org/guide/components/bootstrap-4.html#usage
My API:
return ListingResource::collection(Listing::where('cp', '=', $value)->paginate($pagination));
In my child component:
links: {
type: Object,
required: true
}
import { Bootstrap5Pagination } from 'laravel-vue-pagination';
<Bootstrap5Pagination
:data="links"
@pagination-change-page="getResults"
/>
i tryed with Bootstrap4Pagination also, i have same result.