Skip to content

Commit

Permalink
Update BelongsToManyRelationManager.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Nov 29, 2021
1 parent 41fc242 commit 2fdf288
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ protected function save(): void
}

// https://github.com/laravel/framework/issues/4962
public function applySelectToTableQuery(Builder $query): Builder
protected function getTableQuery(): Builder
{
$query = parent::getTableQuery();

return $query->select($this->getRelationship()->getTable().'.*', $query->getModel()->getTable().'.*');
}
}

0 comments on commit 2fdf288

Please sign in to comment.