@php use App\Http\Controllers\TestController; use App\Models\Demography; $ModuleId="806867ab-96a5-11eb-948a-56b1773fd56f"; $file_type = "vnd.ms-excel"; $file_name= $ReportName."-DrillDown.xls"; header("Content-Type: application/$file_type"); header("Content-Disposition: attachment; filename=$file_name"); $qry2=base64_decode($Query); $Count=$totalcount; $recordsPerPage=500; $totalRecords=$Count; $totalPages=ceil($totalRecords/$recordsPerPage); $hideColumns=[$primarykeyName,$CstmkeyName]; $ColumnName['FirstName']='First Name'; $ColumnName['LastName']='Last Name'; $ColumnName['PhoneMobile']='PhoneMobile'; $ColumnName['CallDateTime']='CallDateTime'; $ColumnName['LeadSource']='LeadSource'; $ColumnName['BranchOffice']='BranchOffice'; $ColumnName['AssignedUserId']='Assigned UserId'; $ColumnName['CreatedDate']='Created Date'; $ColumnName['UpdatedDate']='Updated Date'; $ColumnName['UpdatedBy']='Updated By'; $ColumnName['LeadDisposition']='LeadDisposition'; $ColumnName['LeadSubDisposition']='LeadSubDisposition'; $BranchOfficeDropDown=$GetDropdownLists['69']; $LeadDispositionDropDown=$GetDropdownLists['65']; $LeadSubDispositionDropDown=$GetDropdownLists['66']; $LeadSourceDropDown=$GetDropdownLists['ddfb84a7-5564-4335-9a18-f1a782c018cf']; @endphp
| Slno | @foreach($ColumnName as $colname=>$value){{$value}} | @endforeach
|---|---|
| {{$xx}} | @foreach($ColumnName as $colname=>$value) @php $a=$result->$colname; if($colname=='LeadSource' && $a) { if(array_key_exists($a,$LeadSourceDropDown)) { $a=$LeadSourceDropDown[$a]; } } elseif($colname=='BranchOffice' && $a) { if(array_key_exists($a,$BranchOfficeDropDown)) { $a=$BranchOfficeDropDown[$a]; } } elseif($colname=='LeadDisposition' && $a) { if(array_key_exists($a,$LeadDispositionDropDown)) { $a=$LeadDispositionDropDown[$a]; } } elseif($colname=='LeadSubDisposition' && $a) { if(array_key_exists($a,$LeadSubDispositionDropDown)) { $a=$LeadSubDispositionDropDown[$a]; } } elseif($colname=='AssignedUserId' && $a) { if(array_key_exists($a,$getActiveUsersList)) { $a=$getActiveUsersList[$a]['name']; } } elseif($colname=='UpdatedBy' && $a) { if(array_key_exists($a,$getActiveUsersList)) { $a=$getActiveUsersList[$a]['name']; } } @endphp{{$a}} | @endforeach
| {{$xx}} | @foreach($ColumnName as $colname=>$value) @php $a=$result->$colname; if($colname=='LeadSource' && $a) { if(array_key_exists($a,$LeadSourceDropDown)) { $a=$LeadSourceDropDown[$a]; } } elseif($colname=='BranchOffice' && $a) { if(array_key_exists($a,$BranchOfficeDropDown)) { $a=$BranchOfficeDropDown[$a]; } } elseif($colname=='LeadDisposition' && $a) { if(array_key_exists($a,$LeadDispositionDropDown)) { $a=$LeadDispositionDropDown[$a]; } } elseif($colname=='LeadSubDisposition' && $a) { if(array_key_exists($a,$LeadSubDispositionDropDown)) { $a=$LeadSubDispositionDropDown[$a]; } } elseif($colname=='AssignedUserId' && $a) { if(array_key_exists($a,$getActiveUsersList)) { $a=$getActiveUsersList[$a]['name']; } } elseif($colname=='UpdatedBy' && $a) { if(array_key_exists($a,$getActiveUsersList)) { $a=$getActiveUsersList[$a]['name']; } } @endphp{{$a}} | @endforeach