How can I call a native PHP function str_replace()
in my Laravel 4 blade file?
I want to convert my snake_case values to space-separated words using str_replace()
.
I am trying this php code but it's useless.
<th>{{str_replace('_', ' ', $str)}}</th>
You can use php code in .blade.php file
try like this
<th> <?=str_replace('_', ' ', $str)?> </th>