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

[9.x] Adds compilePushIf and compileEndpushIf functions #42762

Merged
merged 2 commits into from
Jun 15, 2022
Merged

[9.x] Adds compilePushIf and compileEndpushIf functions #42762

merged 2 commits into from
Jun 15, 2022

Conversation

mahmoudmohamedramadan
Copy link
Contributor

Sometimes we need to check about something to push the script, instead of using the if directive we can use this directive, for illuminate see the next example:

Old version

@if (true==false)
@push('scripts')
<script>
    console.log('Push');
</script>
@endpush
@endif

New version

@pushIf(true==false, 'scripts')
<script>
    console.log('Push If');
</script>
@endPushIf

@GrahamCampbell GrahamCampbell changed the title Adds compilePushIf and compileEndpushIf functions [9.x] Adds compilePushIf and compileEndpushIf functions Jun 11, 2022
@taylorotwell taylorotwell merged commit c957aac into laravel:9.x Jun 15, 2022
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.

2 participants