Sending multiple parameters at Pipeline #45302
Replies: 4 comments 6 replies
-
Or you use a DTO. There is nothing wrong with using DTO's in this scenario. Could be as simple as a stdClass object |
Beta Was this translation helpful? Give feedback.
-
@
Try using it like: class FixMissingUsers
{
public function handle(Content $content, $next, ...$parameters)
{
// fix user
return $next($content, $parameters);
}
} Here you will receive array of multiple arguments in |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
->through([
new (QueryFilter::class)($q),
])
// Query filter class
protected string $q;
public function __construct(
$q
) {
$this->q = $q;
} this works and through this, you can pass any number of parameters. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Since pipeline accept single parameters, i would like to propose adding multiple parameters to Pipeline->send().
And usage is :
Beta Was this translation helpful? Give feedback.
All reactions