Comma separated list seems to not work on scopes #857
-
Hello everyone, I am using a route like this:
In the controller I use a scope to query the id. AllowedFilter::scope('userId') The scope in the model: public function scopeUserId(Builder $query, $id): Builder
{
dd($id); // output: 1
return $query->where('id', $id);
} The output of Is this correct? What am I doing wrong? I am expecting it to be Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@freekmurze Thank you for putting this into Discussions, but I have already posted it here and never got an answer. It would be really nice if you could say, that this is the wanted behavior. |
Beta Was this translation helpful? Give feedback.
-
Maybe is late... But for references...
The '...' make the magic. Reference: |
Beta Was this translation helpful? Give feedback.
Maybe is late... But for references...
The '...' make the magic.
Reference:
https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list