Answer the question
In order to leave comments, you need to log in
Laravel/Blade - how to escape only part?
Good evening.
According to docs
https://laravel.com/docs/master/blade#displaying-data
{{ $name }} — экранируем и выводим
{!! $name !!} — не экранируем, просто выводим
{{ isset($name) ? $name : 'Default' }} - проверка и выводим с экранированием
// а как сделать что-то вроде
{!! isset($name) ? {{ $name }} : '<span class="class-a">без имени</span>' !!}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question