Using Sushi for table with static data error

Seek help, when i following this https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables i've error: SQLSTATE[HY000]: General error: 1 all VALUES must have the same number of terms (Connection: , SQL: insert into "products" ("brand", "category", "description", "id", "price", "rating", "thumbnail", "title") values (Essence, beauty, The Essence Mascara Lash Princess is a popular mascara known for its volumizing and lengthening effects. Achieve dramatic lashes with this long-lasting and cruelty-free formula., 1, 9.99, 4.94, https://cdn.dummyjson.com/products/images/beauty/Essence%20Mascara%20Lash%20Princess/thumbnail.png, Essence Mascara Lash Princess), I've done following all stuff but still not working
Filament
How to consume an external API with Filament Tables by Leandro Ferr...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
Solution:
solved, i followed the documentation of sushi. it should be here: //Delete this model if exists filament v4 support static table class TableRetirementCalculation extends Model { use HasFactory, Sushi;...
Jump to solution
2 Replies
Dennis Koch
Dennis Koch3mo ago
Sounds like you are trying to import data with different number of columns
Solution
Alvika Aji Prahasta
solved, i followed the documentation of sushi. it should be here: //Delete this model if exists filament v4 support static table class TableRetirementCalculation extends Model { use HasFactory, Sushi; protected $rows = [ [ 'item' => 'Current Age', 'value' => null, ], [ 'item' => 'Ideal Monthly Income based on todays value', 'value' => null, ], [ 'item' => 'Ideal Retirement Age', 'value' => null, ], [ 'item' => 'Years to Retirement', 'value' => null, ], [ 'item' => 'Inflation Rate', 'value' => null, ], [ 'item' => 'Years to Receive Income', 'value' => null, ], [ 'item' => 'Retirement Fund needed at Retirement Age (after inflation)', 'value' => null, ], ]; }
Want results from more Discord servers?
Add your server