© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Connor

Relation Manager Not Showing related items

//CheckoutSession.php
public function checkoutItems(){
  return $this->hasMany(CheckoutItem::class, 'stripe_checkout_id');
}

//CheckoutItem.php
public function checkoutSession()
{
  return $this->belongsTo(CheckoutSession::class, 'stripe_checkout_id');
}    
//CheckoutSession.php
public function checkoutItems(){
  return $this->hasMany(CheckoutItem::class, 'stripe_checkout_id');
}

//CheckoutItem.php
public function checkoutSession()
{
  return $this->belongsTo(CheckoutSession::class, 'stripe_checkout_id');
}    


The section appears at the bottom of my edit CheckoutSession, It just doesnt display any results, however I can see the entries in the DB and the relationships are defined
image.png
d27fbfb414bfe5df9c1bf4be9e187f6e.png
32b924bb9d8c2b701c2d350eae514030.png
Solution
Looks like you have an 'id' field on your stripe_checkout_items table, which is presumably set to be the Primary Key in the migration? In which case the stripe_checkout_id you are trying to use as the FK in the relationship would be expected to reference the 'id' PK on the parent. So again, you probably need to modify your relationship methods on the model to specify the "owner key" as well as the foreign key.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Relation Manager Button not showing up
FilamentFFilament / ❓┊help
2y ago
Associate headerAction not showing on Relation manager?
FilamentFFilament / ❓┊help
3y ago
Relation Manager
FilamentFFilament / ❓┊help
2y ago
Relation Manager
FilamentFFilament / ❓┊help
3y ago