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

[8.x] Add htmlString helper method #40247

Merged
merged 6 commits into from
Jan 4, 2022
Merged

[8.x] Add htmlString helper method #40247

merged 6 commits into from
Jan 4, 2022

Conversation

Larsklopstra
Copy link
Contributor

@Larsklopstra Larsklopstra commented Jan 4, 2022

Motivation:

I often use the HtmlString to render Stringable data without using {!! $content !!}.

Before:

return new HtmlString(Str::of($content)->markdown());

return new HtmlString(Str::markdown($content));

After:

return Str::of($content)
    ->markdown()
    ->html();

@driesvints driesvints changed the title Add htmlString helper method [8.x] Add htmlString helper method Jan 4, 2022
@driesvints
Copy link
Member

@selcukcukur instead of downvoting please provide feedback why you don't like this addition.

@driesvints
Copy link
Member

@Larsklopstra maybe just ->html()?

@taylorotwell taylorotwell merged commit 8b63611 into laravel:8.x Jan 4, 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.

None yet

3 participants