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.