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

[7.x] Add isEmpty() method to HtmlString #32289

Merged
merged 3 commits into from
Apr 8, 2020

Conversation

mvdnbrk
Copy link
Contributor

@mvdnbrk mvdnbrk commented Apr 8, 2020

This PR adds an isEmpty method to the \Illuminate\Support\HtmlString class just like the Stringable class has.

$string = new \Illuminate\Support\HtmlString(''); 

if ($string->isEmpty())

// vs

if (empty($string->toHtml()))

@taylorotwell taylorotwell merged commit 5b3a6cf into laravel:7.x Apr 8, 2020
@mvdnbrk
Copy link
Contributor Author

mvdnbrk commented Apr 8, 2020

@taylorotwell Thank you!

@mvdnbrk mvdnbrk deleted the htmlstring-is-empty branch April 8, 2020 17:46
@vlakoff
Copy link
Contributor

vlakoff commented Apr 19, 2020

Refs #32300

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

3 participants