Closed swilliamrobert closed 2 years ago
try categories.meta.links
Could you try using ->through()
instead of ->transform()
?
In either case, since I'm cleaning up issues, I'll be closing this one for now. If you feel like it's definitely an Inertia issue, and my suggestion didn't work, then feel free to re-open this 👍
Versions:
@inertiajs/inertia
version: #.#.#@inertiajs/inertia-vue
version: #.#.#Describe the problem:
Hi, I am having an issue with inertia pagination link while loading the categories list.
The categories.links is returning undefined. Not sure why the vue component can't identify the links object. I am expecting the links object to use for pagination. I don't see this in my Vue props.
[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'length')"
Can you please help me to resolve this issue? Thanks.
Please see the below code.
Laravel7 and Vue2
Category Controller:
Category Index Component:
Pagination Component:
The actual pagination link from the laravel.