Шаблон отчета дежурного врача
This commit is contained in:
41
app/Exports/DutyReportExport.php
Normal file
41
app/Exports/DutyReportExport.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Models\Department;
|
||||
use App\Models\User;
|
||||
use Maatwebsite\Excel\Concerns\FromArray;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
|
||||
class DutyReportExport implements FromArray, WithTitle
|
||||
{
|
||||
protected array $data;
|
||||
protected array $dateRange;
|
||||
protected User $user;
|
||||
protected Department $department;
|
||||
protected string $reportName;
|
||||
|
||||
public function __construct(
|
||||
array $data,
|
||||
array $dateRange,
|
||||
User $user,
|
||||
Department $department,
|
||||
string $reportName = 'Статистика по отделениям',
|
||||
) {
|
||||
$this->data = $data;
|
||||
$this->dateRange = $dateRange;
|
||||
$this->user = $user;
|
||||
$this->department = $department;
|
||||
$this->reportName = $reportName;
|
||||
}
|
||||
|
||||
public function array(): array
|
||||
{
|
||||
// TODO: Implement array() method.
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return $this->sheetTitle;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user