6 months ago

How to deal with deprecated str_* functions in blade templates?

Posted 6 months ago by thebigk

I've recently upgraded to Laravel 5.8 and found out that the str_* helpers have been deprecated. Until now, I was super comfortable using these helpers in my blade templates. For example -

{{str_plural('Like', $project->likes_count)}}

...would quickly give me Like and Likes. What's the new way to achieve this with Str:: ? I'm not sure if name-spacing is supported in the template.

Thank you in advance for your time and support.

Please sign in or create an account to participate in this conversation.