Laravel Blade (Error While Displaying Text)

Asked

Viewed 145 times

2

Hello, I’m using Blade to show data, the q problem when using the functions ucwords and strtolower is not displayed. (without the right functions, but the text is ugly, or all uppercase, or ,minusculo because customers do not register following a pattern. I could do the conversion in the register, but it is intriguing ). I need to activate some extension?

(I’m using Xampp, localhost)

{{ ucwords(strtolower($produto->produto)) }}
  • 1

    You can track which one is failing sff. Use one at a time and see if/which failure

  • @Miguel Thanks, I searched, what I saw that there is another function: mb_strtolower , I do not know if strtolower is for older servers.

2 answers

3


Use {!! !!} instead of {{ }}

{!! ucwords(strtolower($produto->produto)) !!}
  • Your solution solves, but accentuated words get disfigured, I’m using {{ ucwords(mb_strtolower($product->product)) }} worked.

  • But the problem you reported was only that the word did not appear. So I just answered what would solve this question. What came after is because of another cause.

  • @Jonasferreira if the answer was the solution of your problem, why not accept it ?

  • Because I’m looking for where you do this, I’ve never used this site kkk; Help me there. @Virgilionovic

  • 1

    @Jonasferreira below the arrow pointed down has a check just click on top! the check of course kkk

0

Solution - used the function mb_strtolower

{{ ucwords(mb_strtolower($produto->produto)) }} 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.