@foreach($doc->attachment as $attachment)
@if($attachment->is_remove != 1)
@if($attachment->type == 'pdf')
{{(strlen($attachment->name) > 15)?substr($attachment->name, 0, 15) . '...':$attachment->name}}
@elseif($attachment->type == 'jpg' || $attachment->type == 'jpeg' || $attachment->type == 'png' || $attachment->type == 'gif')
{{(strlen($attachment->name) > 15)?substr($attachment->name, 0, 15) . '...':$attachment->name}}
@elseif($attachment->type == 'msword' || $attachment->type == 'doc' || $attachment->type == 'docx')
{{(strlen($attachment->name) > 15)?substr($attachment->name, 0, 15) . '...':$attachment->name}}
@elseif($attachment->type == 'xls' || $attachment->type == 'xlsx')
{{(strlen($attachment->name) > 15)?substr($attachment->name, 0, 15) . '...':$attachment->name}}
@elseif($attachment->type == 'ppt' || $attachment->type == 'pptx')
{{(strlen($attachment->name) > 15)?substr($attachment->name, 0, 15) . '...':$attachment->name}}
@elseif($attachment->type == 'zip')
{{(strlen($attachment->name) > 15)?substr($attachment->name, 0, 15) . '...':$attachment->name}}
@endif
{{----}}
@endif
@endforeach