diff --git a/src/Resources/RelationManagers/BelongsToManyRelationManager.php b/src/Resources/RelationManagers/BelongsToManyRelationManager.php index 5421376b..f5cbe87d 100644 --- a/src/Resources/RelationManagers/BelongsToManyRelationManager.php +++ b/src/Resources/RelationManagers/BelongsToManyRelationManager.php @@ -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().'.*'); } }