getTableQuery() for pivot table that does not have a primary key

hey friends, i try to display a pivot table that does not have a primary key. i have a model for the pivot table. if i use the following query ´´´php protected function getTableQuery(): Builder|Relation { return Insight::query(); } ´´´ i get the following error: ´´´ App\Http\Livewire*::getTableRecordKey(): Return value must be of type string, null returned ´´´ if i add a primary key to the pivot table, it works without problems. any ideas?
2 Replies
Dan Harrin
Dan Harrin2y ago
you need a primary key, its mandatory
maltebaer
maltebaerOP2y ago
okay, good to know. thanks for your answer.
Want results from more Discord servers?
Add your server