Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Added custom methods proxy support for jobs ::dispatch() #34781

Merged
merged 3 commits into from Oct 12, 2020
Merged

[8.x] Added custom methods proxy support for jobs ::dispatch() #34781

merged 3 commits into from Oct 12, 2020

Conversation

rennokki
Copy link
Contributor

This seems a bit too nested:

dispatch(
    (new SomeJob('value1'))
        ->someMethod(1234)
        ->someOtherMethod('abc')
);

With the current changes, I find the ::dispatch() method a bit more approachable:

SomeJob::dispatch('value1')
    ->someMethod(1234)
    ->someOtherMethod('abc');

Both someMethod and someOtherMethod are custom methods within the job class.

@taylorotwell taylorotwell merged commit 158c43c into laravel:8.x Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants