@php
$documents = (@$detail->getbusinessdoc()) ? @$detail->getbusinessdoc()->get() : '';
$license_certi = (@$documents->where('title', 'license_certi')->first()) ? @$documents->where('title', 'license_certi')->first():'';
$tax_certi = (@$documents->where('title', 'tax_certi')->first()) ? @$documents->where('title', 'tax_certi')->first():'';
$agreement_certi = (@$documents->where('title', 'agreement_certi')->first()) ? @$documents->where('title', 'agreement_certi')->first():'';
$iso_certi = (@$documents->where('title', 'iso_certi')->first()) ? @$documents->where('title', 'iso_certi')->first():'';
$gmp_certi = (@$documents->where('title', 'gmp_certi')->first()) ? @$documents->where('title', 'gmp_certi')->first():'';
$reach_compliance = (@$documents->where('title', 'reach_compliance')->first()) ? @$documents->where('title', 'reach_compliance')->first():'';
$osha_compliance = (@$documents->where('title', 'osha_compliance')->first()) ? @$documents->where('title', 'osha_compliance')->first():'';
$hazardous_certi = (@$documents->where('title', 'hazardous_certi')->first()) ? @$documents->where('title', 'hazardous_certi')->first():'';
$haccp_certi = (@$documents->where('title', 'haccp_certi')->first()) ? @$documents->where('title', 'haccp_certi')->first():'';
$extArr = [
'pdf' => 'pdf',
'doc' => 'word',
'docx' => 'word',
'xls' => 'excel',
'xlsx' => 'excel',
'ppt' => 'ppt',
'pptx' => 'ppt',
'txt' => 'text',
'rtf' => 'text',
];
$extA = [
'pdf',
'doc',
'docx',
'xls',
'xlsx',
'ppt',
'pptx',
];
@endphp
@if(@$license_certi)
@endif
@if(@$tax_certi)
@endif
@if(@$agreement_certi)
@endif
@if(@$iso_certi)
@endif
@if(@$gmp_certi)
@endif
@if(@$reach_compliance)
@endif
@if(@$osha_compliance)
@endif
@if(@$hazardous_certi)
@endif
@if(@$haccp_certi)
@endif