Skip to content

[5.4] Implement standalone if empty in a NB-Change-Way#18738

Merged
taylorotwell merged 5 commits into
laravel:5.4from
LKaemmerling:5.4
Apr 9, 2017
Merged

[5.4] Implement standalone if empty in a NB-Change-Way#18738
taylorotwell merged 5 commits into
laravel:5.4from
LKaemmerling:5.4

Conversation

@LKaemmerling

@LKaemmerling LKaemmerling commented Apr 9, 2017

Copy link
Copy Markdown
Contributor

As addition of #18425 it would be nice if the @empty statement can be used outside of an forelese.

This PR implements this in a Non Breaking Change way.

So you can use it with:

@empty($array)
This Array is Empty!
@endempty

instead of

@if(empty($array))
This Array is Empty!
@endif

This has no impact to the @forelse statement.

@LKaemmerling LKaemmerling changed the title [5.4] Implement standalone if empty in as NB-Change-Way [5.4] Implement standalone if empty in a NB-Change-Way Apr 9, 2017
@taylorotwell
taylorotwell merged commit 3687363 into laravel:5.4 Apr 9, 2017
@LKaemmerling

Copy link
Copy Markdown
Contributor Author

Thank you!

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