kingtox
HasManythrough showing wrong owner record Id
this is what i have done in my relation getTableQuery()
protected function getTableQuery(): Builder
{
$relationship = $this->getRelationship();
if (! $relationship) {
return null;
}
$query = $relationship->getQuery();
return parent::getTableQuery()->select($query->getModel()->getTable() . '.*');
}
20 replies
HasManythrough showing wrong owner record Id
you are 100% correct, i have exactly the same problem, it's overwriting 'user_id' with the strange id which doesn't exist in the database. is it safe to upgrade to V3? is it working fine with laravel 9? i have upgrade to laravel 10 but most of the packages are not compatible with laravel 10. thank you so much for the detail explanation.
20 replies