Skip to content

Commit

Permalink
Used $relatedKey
Browse files Browse the repository at this point in the history
  • Loading branch information
joostbaptist authored and fico7489 committed Feb 22, 2018
1 parent d7608aa commit ef3a521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Relations/BelongsToManyCustom.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function attach($ids, array $attributes = [], $touch = true)
public function detach($ids = null, $touch = true)
{
if (is_null($ids)) {
$ids = $this->query->pluck($this->query->qualifyColumn('id'))->toArray();
$ids = $this->query->pluck($this->query->qualifyColumn($this->relatedKey))->toArray();
}

list($idsOnly) = $this->getIdsWithAttributes($ids);
Expand Down

0 comments on commit ef3a521

Please sign in to comment.