Skip to content

Commit

Permalink
Removed dependency on Model's id key to support those Models which ha…
Browse files Browse the repository at this point in the history
…ve an uncommon primary key
  • Loading branch information
darkostanimirovic committed Apr 18, 2018
1 parent 5683a4a commit 4bf5c0b
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 4bf5c0b

Please sign in to comment.