REFERENCE :https://stackoverflow.com/questions/11434091/add-if-string-is-too-long-php/11434149
@if (strlen($item->description) <=150)
{!!$item->description!!}
@else
{!!substr($item->description, 0, 150) . '...'!!}
@endif
@foreach($mission as $mission)
@if (strlen($mission->description) <=150)
{{$mission->description}}
@else {{substr($mission->description, 0, 150) . '...'}}
@endif
{{-- The Youth Innovation Lab (YI-Lab) is an initiative of social enterprise with a mission to challenge the TINA (There Is No Alternative) mentality..--}} @endforeach
Comments
Post a Comment