-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
Version: v1.0.0-beta.1
Im getting this error "Expecting filter value to be an array, or a string when a string delimiter is set.".
URL Im hitting: http://localhost:8000/api/jsonapi/product-categories?filter[id]=3
My filters method in Schema class:
public function filters(): array
{
return [
WhereIdIn::make($this),
];
}I think the problem is here: /vendor/laravel-json-api/eloquent/src/Filters/Concerns/HasDelimiter.php on line 53:
protected function toArray($value): array
{
if ($this->delimiter && \is_string($value)) {
return \explode($this->delimiter, $value);
}
if (\is_array($value)) {
return $value;
}
throw new \LogicException(
'Expecting filter value to be an array, or a string when a string delimiter is set.'
);
}This method throws that error, because the $value is simply a string.
I think this is a bug.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation