I have installed Laravel Markdown but still printing HTML code.
my model
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use GrahamCampbell\Markdown\Facades\Markdown;
use Illuminate\Support\HtmlString;
class Post extends Model
{
public function getContentHtmlAttribute($value)
{
return Markdown::convertToHtml(e($this->content));
}
}
my blade page
{!! $post->content_html !!}
printing
<h2 style="font-family: DauphinPlain; line-height: 24px;
color: rgb(0, 0, 0); margin: 0px 0px 10px; font-size: 24px;
padding: 0px;">What is Lorem Ipsum?
Thank you
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2fY3sdi
via IFTTT
Aucun commentaire:
Enregistrer un commentaire