Remove HTML tags from Strings on laravel blade

Solution:1

Try to use strip_tags() function:

http://php.net/manual/en/function.strip-tags.php

Update: Try to do something like this in a controller:

$taglessBody = strip_tags($subject->body);

Then pass this variable into a blade template and use it instead of $subject->body.

Solution:2

You can use strip_tags($yourString); to strip the html tags. In blade you could achieve this by

{{ strip_tags($yourString) }} 
//if your string is <h1> my string </h1>
//output will be my string.

hope that is helpful 🙂