Items

Passing Arguments

Recommended

You can pass an argument to your output action with the arg or argument method:

$workflow->item()->arg('bob');

// or

$workflow->item()->argument('bob');

You can also pass an array to either method:

$workflow->item()->arg([
    'The Roquefort Files Burger',
    'Hit Me With Your Best Shallot Burger',
]);

Heads up

While passing an argument is optional, it's highly recommended that you do. If excluded, you won't know which item the user has selected.

Previous
Subtitle