FilamentF
Filament•3y ago
kingtox

HasManythrough showing wrong owner record Id

Hey đź‘‹

In my model I have a relationship

public function resultLog()
{
return $this->hasManyThrough(
ResultLog::class, Result::class,
'user_id', 'result_id', 'id', 'id'
);
}

I define primary key in my modal as a user_id, but for some reason the relation manager is showing wrong user_id of the owner record, it shows random user_id.
Was this page helpful?