feat: add visits export
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromArray;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
|
||||
class VisitsExport implements FromArray, WithHeadings, ShouldAutoSize
|
||||
{
|
||||
protected $rows;
|
||||
|
||||
public function __construct(array $rows)
|
||||
{
|
||||
$this->rows = $rows;
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'شناسه',
|
||||
'نام',
|
||||
'نام خانوادگی',
|
||||
'ایمیل',
|
||||
'موبایل',
|
||||
'تاریخ ثبتنام',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function array(): array
|
||||
{
|
||||
return $this->rows;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user