Kaesa Lyrih
Can Query Model Pivot Custom Table without field id?
I'm trying to create a Custom Table with the Pivot Model
Enrollment
, but I encountered an error. I don't have the id
field in the enrollments
pivot table. How can I modify the query without using ORDER BY id
? Should I add the id field to the pivot table?
- Error:
SQLSTATE[42703]: Undefined column: 7 ERROR: column enrollments.id does not exist LINE 1: select * from "enrollments" order by "enrollments"."id" asc ... ^
5 replies
Summarize Table RelationManager
I am attempting to use the
summarize
feature from Filament on a table that exists in RelationManager
. However, I encounter an error:
When I remove $table->id()
in create_package_product_table.php
, the error changes to:
If I remove $table->timestamps()
in create_package_product_table.php
, the summarize feature can be used. How can I use summarize
on a table in RelationManager
without having to remove $table->id()
and $table->timestamps()
?5 replies