protonemedia / laravel-splade

💫 The magic of Inertia.js with the simplicity of Blade 💫 - Splade provides a super easy way to build Single Page Applications (SPA) using standard Laravel Blade templates, and sparkle it to make it interactive. All without ever leaving Blade.
https://splade.dev
MIT License
1.47k stars 111 forks source link

Can Splade Table be used for external API data #480

Closed christopherokonkwo closed 1 year ago

christopherokonkwo commented 1 year ago

You may use the built-in Artisan Command to show the installed versions of the packages:

php artisan splade:show-versions

Make sure both Splade packages (JS + PHP) are up-to-date and on the same version. For example, when using version 0.5.0 of the PHP package, you should use the same JavaScript package version.

Description:

How can I use the splade table for data gotten from an external API?

aimonext commented 1 year ago

This feature is currently unavailable

christopherokonkwo commented 1 year ago

I found a way, the data has to be paginated from the API endpoint. Then I created a new laravel paginator instance and then pass it to the splade $table. It works for me but that requires an appreciable knowledge of Laravel's way of pagination.