External API CRUD in Filament
I am using "https://github.com/kawax/laravel-google-sheets" and "https://github.com/calebporzio/sushi". At the moment I can fetch the data from google sheets.
I followed these two source "https://laraveldaily.com/post/filament-load-table-data-from-3rd-party-api" and "https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables". I could not find any other reference for update, create and delete. Is it possible to do this in filament? do I need to create custom livewire class?
currently I have this for retrieving the data from google sheets
6 Replies
You cannot create from Sushi only read. If you wish to create, you'll need to build your own form and store it with your own method.
I see. thank you
It is not possible as filament fully relies in eloquent model and sushi just can provide you way to read or populate data but it comes with a lot of limitations & challenges when it comes table capabilities (sorting, filtering, so on, also create/update/delete) etc.
I recommend that you implement your own livewire component and integrate with filament tables, forms, actions or what ever you need.
- https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component
- https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component
- https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component
You just need to learn the livewire fundamentals from the docs and you start truly from there.
--------------------------------------------------
Aside, you check this discussion if it helps
GitHub
Building Custom Table From API Data source and interact with API · ...
I want to create a custom page in Filament but do not want to use Filaments table builder. I just want to use the Filament table's HTML and style so that the admin panel has a similar design. I...
Useful information from previous thread
https://discord.com/channels/883083792112300104/1231990195017089056