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

[5.6] Add thenPingIf and pingBeforeIf #24077

Merged
merged 2 commits into from
May 2, 2018
Merged

[5.6] Add thenPingIf and pingBeforeIf #24077

merged 2 commits into from
May 2, 2018

Conversation

ThunderBirdsX3
Copy link
Contributor

@ThunderBirdsX3 ThunderBirdsX3 commented May 2, 2018

In case of you want to ping in specific condition.

$schedule->command('something')
         ->everyMinute()
         ->pingBeforeIf(app()->environment() == 'production', $url)
         ->thenPingIf(app()->environment() == 'production', $url);

@taylorotwell taylorotwell merged commit 07e1c5e into laravel:5.6 May 2, 2018
@GrahamCampbell GrahamCampbell changed the title Add thenPingIf and pingBeforeIf [5.6] Add thenPingIf and pingBeforeIf May 3, 2018
@sailingdeveloper
Copy link
Contributor

To be consistent with when on the Builder and Collection, shouldn't it be pingBeforeWhen and thenPingWhen?

@timodejong95
Copy link

@ThunderBirdsX3 ?

@ThunderBirdsX3
Copy link
Contributor Author

I don't know. I just use thenPingIf and pingBeforeIf for no reason.

I think you must to ask @taylorotwell . Why it shouldn't it be pingBeforeWhen and thenPingWhen?

@timodejong95
Copy link

@ThunderBirdsX3 thenPingWhen and pingBeforeWhen should be more consistent with the current Laravel code like @sailingdeveloper mentioned previously.

Also here is an example: https://laravel.com/docs/5.6/blade#including-sub-views here includeIf is more a if exists do it and includeWhen is conditional based.

@taylorotwell Do you agree?

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.

4 participants