Skip to content

Commit

Permalink
Merge pull request #20 from Dartanjan/master
Browse files Browse the repository at this point in the history
Support uncommon primary keys for models
  • Loading branch information
zachleigh authored Apr 22, 2018
2 parents 5683a4a + 4bf5c0b commit 130c8c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Settings/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ protected function deleteRecord($key)
protected function getByKey($key)
{
return $this->propertyBag()
->where('resource_id', $this->resource->id)
->where('resource_id', $this->resource->getKey())
->where('key', $key)
->first();
}
Expand Down Expand Up @@ -431,7 +431,7 @@ protected function getAllSettings()
}

return $this->propertyBag()
->where('resource_id', $this->resource->id)
->where('resource_id', $this->resource->getKey())
->get();
}

Expand Down

0 comments on commit 130c8c9

Please sign in to comment.