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

Conversation

Projects
None yet
4 participants
@ThunderBirdsX3
Copy link
Contributor

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);

ThunderBirdsX3 added some commits May 2, 2018

Add `thenPingIf`
Add `thenPingIf`

@taylorotwell taylorotwell merged commit 07e1c5e into laravel:5.6 May 2, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@GrahamCampbell GrahamCampbell changed the title Add `thenPingIf` and `pingBeforeIf` [5.6] Add `thenPingIf` and `pingBeforeIf` May 3, 2018

@sailingdeveloper

This comment has been minimized.

Copy link

commented May 8, 2018

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

@timodejong95

This comment has been minimized.

Copy link

commented May 22, 2018

@ThunderBirdsX3

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2018

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

This comment has been minimized.

Copy link

commented May 23, 2018

@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
You can’t perform that action at this time.