Reputation: 1
I am new to laravel.
I am using {{ Str::limit($leave->leave_reasone, 50) }}
to show limited Text And
{!! $leave->leave_reasone !!}
to remove Html Tags. But
How can I apply Both in laravel blade?
Upvotes: 0
Views: 799
Reputation: 6233
you can use limit inside {!! !!}
. both {{ }}
and {!! !}}
print variables inside them. the difference is {{ }}
uses PHP's htmlspecialchars function to prevent XSS attacks while {!! !}}
is used to print unescaped data.
{!! Str::limit($leave->leave_reasone, 50) !!}
Upvotes: 0