diff --git a/src/Hashidable.php b/src/Hashidable.php index de2624f..2b76b87 100644 --- a/src/Hashidable.php +++ b/src/Hashidable.php @@ -34,13 +34,13 @@ public static function findByHashidOrFail(string $hash) * Finds a model by the hashid or fails * * @param string $hash - * @return \Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Builder */ public static function whereHashid(string $hash) { $static = new static(); - return $static->where($static->hashidableEncoder()->decode($hash)); + return $static->whereId($static->hashidableEncoder()->decode($hash)); } /**