Rendering HTML Tags Laravel 5 Blade Templating -


i'm working on laravel app , displaying content database, datatype text , content

<span style="font-weight: bold; font-style: italic;">what dog's name?</span>

as can see has html tags when rendered in view, instead of formatting text what dog's name? displaying entire content

<span style="font-weight: bold; font-style: italic;">what dog's name?</span> 

it's not reading html tag. there convertion need in formatting? when view source it,

&lt;span style="font-weight: bold; font-style: italic;"&gt;what dog's name?&lt;/span&gt; 

here's code:

view

<table class="table table-striped table-bordered">                                     <tbody>        @foreach($questions $key => $value)            <tr>                <td class="">{{ $value->question }}</td>            </tr>        @endforeach    </tbody> 

my controller:

public function create() {     $questions = question::where('isenabled', '=', 'yes')->get();      return view('crm.create')->with(array('questions' => $questions)); } 

you need tell blade not escape html using {!! !!}

nb: applicable if using laravel 5

@foreach($questions $key => $value)   <tr>      <td class="">{!! $value->question !!}</td>   </tr> @endforeach 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -