Laravel Escaping All HTML in Blade Template
Change your syntax from {{ }}
to {!! !!}
.
As The Alpha said in a comment above (not an answer so I thought I'd post), in Laravel 5, the {{ }}
(previously non-escaped output syntax) has changed to {!! !!}
. Replace {{ }}
with {!! !!}
and it should work.
I had the same issue. Thanks for the answers above, I solved my issue. If there are people facing the same problem, here is two way to solve it:
- You can use
{!! $news->body !!}
- You can use traditional php openning (It is not recommended) like:
<?php echo $string ?>
I hope it helps.