使用laravel excel映射具有多个标题的查询结果

I am exporting an excel using Laravel excel 3.1 by Maatwebsite. I want to map it with 2 headings and display it one below the other

I'm using WithHeadings, WithMapping, FromArray I'm getting the records, just the format that needs correction

<?php

namespace App\Exports;

use Modules\Program\Entities\Program;
use Moduleseport\Entitieseport;
use DB;
use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithTitle;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithMapping;

class reportPerDaySheet implements  FromArray, WithTitle, WithHeadings, ShouldAutoSize, WithMapping
{
    private $year;
    private $day;
    private $month;

    public function __construct(int $year, int $month, int $day)
    {
        $this->year = $year;
        $this->day = $day;
        $this->month  = $month;
    }


    public function array():array
    {    
        $reportOut = DB::table('reports')->join('programs','programs.program_id','=','reports.program_id')->whereMonth('report_dateofreport', $this->month)->whereday('report_dateofreport', $this->day)->get()->toArray();

        return $reportOut;
    }

    public function map($reportOut):array
    {
        return [
            [
                $reportOut->program_programname,
                $reportOut->program_projectlead,
                $reportOut->program_dse,
                $reportOut->program_extserviceprovider,
                $reportOut->program_programid,
                $reportOut->program_datatype,
            ],
            [
                $reportOut->report_id,
                $reportOut->report_date,
                $reportOut->report_url,
                $reportOut->report_username,
                $reportOut->report_reportertype,
                $reportOut->report_productname,
                $reportOut->report_verbatim,
                $reportOut->report_priority,
                $reportOut->report_aeraised,
            ]            
        ];
    }


    public function title(): string
    {
        return $this->day .' '. date("F", mktime(0,0,0,$this->month,1)) .' '. $this->year;
    }
    public function headings(): array
    {
        return[
            [
              'Program Name',
              'Project Lead',
              'DS&E Contact',
              'Name of external service provider',
              'Prepared By',
              'External Service Provider Contact Information',
              'Time Period Covered',
              'Program ID',
              'Date of Report',
              'Data Type',
              'Signature'
            ],
            [
                'Id',
                'Date of report',
                'Date',
                'URL',
                'Username',
                'Reporter Type',
                'Product Name',
                'Verbatim',
                'Priority',            
                'AE Raised',
                'User',
                'Date From',
                'Date Till',
                'Record Created At',
                'Record Updated At'
            ]                   
        ];
    }
}

Current Output: enter image description here

Desired Output: enter image description here

In your situation it would be recommended to build the array including the headers within the array() method. Heading rows will always be displayed as the first x rows. (Depending on how many arrays you return)