protonemedia/laravel-splade

Can Splade Table be used for external API data

christopherokonkwo opened this issue · 2 comments

  • Laravel Version: 10.14.1
  • PHP Version: 8.1.2
  • Splade JS Version (npm): 1.4.15
  • Splade PHP Version (composer): 1.4.15.1
  • Dev environment (OS, Sail/Valet/etc): Ubuntu OS

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?

This feature is currently unavailable

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.