Relationship manager using a wrong identifier

II have created a relationship manager it displays the results when I navigate to the view page but the output is not right
This is how I created the relationship manager
php artisan make:filament-relation-manager DistrictResource counties districtCode so I thought it has use the districtCode as the foreign key but instead its not using it
Solution
solved i had missed passing the local key in the model so it would reference the id but now it works fine thank you
public function counties():HasMany
{
return $this->hasMany(County::class, 'districtCode', 'districtCode');
}
Was this page helpful?