FIX_TABLE_NOT_FOUND_ISSUE
This commit is contained in:
parent
47d778bfe2
commit
ab43cdc68a
@ -1076,10 +1076,23 @@ class EmployeeController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $html, 'file_data' => $file_name, 'excel_data' => $excel_data], 200);
|
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $html, 'file_data' => $file_name, 'excel_data' => $excel_data], 200);
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $th) {
|
||||||
|
|
||||||
|
$errorData = [
|
||||||
|
'message' => $th->getMessage(),
|
||||||
|
'file' => $th->getFile(),
|
||||||
|
'line' => $th->getLine(),
|
||||||
|
'code' => $th->getCode(),
|
||||||
|
'trace' => $th->getTraceAsString(),
|
||||||
|
'trace_array' => $th->getTrace(), // full array version (optional)
|
||||||
|
'function' => $th->getTrace()[0]['function'] ?? null,
|
||||||
|
'class' => $th->getTrace()[0]['class'] ?? null,
|
||||||
|
];
|
||||||
|
|
||||||
// Handle exception
|
// Handle exception
|
||||||
$errorMessage = 'Error occurred: ' . $e->getMessage();
|
$errorMessage = 'Error occurred:' . PHP_EOL . json_encode($errorData, JSON_PRETTY_PRINT);
|
||||||
$this->myLogger->logme('error', $errorMessage);
|
$this->myLogger->logme('error', $errorMessage);
|
||||||
|
|
||||||
$html = '<div class="text-center">No Data Found</div>';
|
$html = '<div class="text-center">No Data Found</div>';
|
||||||
return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => $html, 'file_data' => $file_name], 500);
|
return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => $html, 'file_data' => $file_name], 500);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,15 +22,13 @@ table.dataTable tbody td {
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody class="font-12">
|
<tbody class="font-12">
|
||||||
<?php for ($i = 1; $i <= $count; $i++): ?>
|
<?php helper('excel_util_helper'); foreach ($tbody as $body) { if(check_row_is_empty_or_null($body)){break;} ?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php foreach ($tbody[$i] as $data): ?>
|
<?php foreach ($body as $data){ ?>
|
||||||
<td>
|
<td><?= esc($data) ?></td>
|
||||||
<?php echo $data;?>
|
<?php } ?>
|
||||||
</td>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php } ?>
|
||||||
</tr>
|
|
||||||
<?php endfor; ?>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- end .table-responsive -->
|
</div> <!-- end .table-responsive -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user