Skip to content

Commit db84a36

Browse files
committed
Merge tag 'v0.5.4' into develop
Fix bug in Eloquent adapter
2 parents e81937c + 24a9832 commit db84a36

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to this project will be documented in this file. This project adheres to
33
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
44

5+
## [0.5.4] - 2016-12-21
6+
7+
### Fixed
8+
- Bug in Eloquent adapter meant that a check for whether a resource identifier exists was checking whether the
9+
whole table had any rows, rather than the specific id.
10+
511
## [0.5.3] - 2016-12-01
612

713
### Fixed

src/Adapters/EloquentAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ public function recognises($resourceType)
6767

6868
/**
6969
* @param ResourceIdentifierInterface $identifier
70-
* @return mixed
70+
* @return bool
7171
*/
7272
public function exists(ResourceIdentifierInterface $identifier)
7373
{
7474
$model = $this->resolve($identifier->getType());
7575
$key = $this->resolveQualifiedKeyName($model, $identifier->getType());
7676

77-
return $this->newQuery($model)->exists($key, $identifier->getId());
77+
return $this->newQuery($model)->where($key, $identifier->getId())->exists();
7878
}
7979

8080
/**

0 commit comments

Comments
 (0)