}
public function exportExcel() {
- $errorlinks = FluidbookAuditLink::whereNotNull('error_code')->get()->toArray();
- //$redirectionlinks = FluidbookAuditLink::whereNull('redirection_code')->get()->toArray();
+ $errorlinks = FluidbookAuditLink::where('error_code','!=','')->get()->toArray();
+ $redirectionlinks = FluidbookAuditLink::where('redirection_code','!=','')->get()->toArray();
+
+ $links = [
+ "erreurs" => $errorlinks,
+ "avertissements" => $redirectionlinks
+ ];
$errorKeys = array_keys($errorlinks[0]);
$excel->getActiveSheet()->getProtection()->setSheet(true);
$excel->getDefaultStyle()->getProtection()->setLocked(false);
+ foreach ($links as $sheets) {}
$line = 1;
$columns = 0;
$c = 0;