© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
Kaesa Lyrih

Can Query Model Pivot Custom Table without field id?

I'm trying to create a Custom Table with the Pivot Model
Enrollment
Enrollment
, but I encountered an error. I don't have the
id
id
field in the
enrollments
enrollments
pivot table. How can I modify the query without using
ORDER BY id
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 ... ^
SELECT * FROM "enrollments" ORDER BY "enrollments"."id" ASC limit 10 OFFSET 0
SELECT * FROM "enrollments" ORDER BY "enrollments"."id" ASC limit 10 OFFSET 0
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

table without model
FilamentFFilament / ❓┊help
3y ago
Pivot data in model/resource table
FilamentFFilament / ❓┊help
2y ago
Custom query table
FilamentFFilament / ❓┊help
3y ago
How can i trigger model events when changing pivot table
FilamentFFilament / ❓┊help
12mo ago