notes as a relation manager (to store notes about various animals) and there is animal_id column (not a primary key, that is traditionally id as usual, just an arbitrary integer identifier).animals.Animal (the original one) and additional two I created later: Dog and Cat. They all use the same table animals.AnimalResource, DogResource and CatResource. App\Filament\Resources\AnimalResource\RelationManagers\NotesRelationManager.php for notes for AnimalResource.App\Filament\Resources\DogResource\RelationManagers\NotesRelationManager.php for notes for DogResource.App\Filament\Resources\CatResource\RelationManagers\NotesRelationManager.php for notes for CatResource.notes.animal_id instead of notes.dog_id or notes.cat_id to get the results from the notes table based on the value in the animal_id column. return $this->hasMany(Comment::class, 'foreign_key', 'animimal_id');