35 lines
918 B
PHP
35 lines
918 B
PHP
<?php namespace Aman\Reestr\Imports;
|
|
|
|
use Maatwebsite\Excel\Concerns\ToModel;
|
|
use Aman\Reestr\Models\ReestrDocumentation;
|
|
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
|
|
|
class ReestrImportDocumentation implements ToModel ,WithHeadingRow
|
|
|
|
{
|
|
/**
|
|
* @param array $row
|
|
*
|
|
* @return ReestrMeasureInstrument|null
|
|
*/
|
|
|
|
public function model(array $row)
|
|
{
|
|
return new ReestrDocumentation([
|
|
'document_no' => $row['document_no'],
|
|
'document_no_replacement' => $row['document_no_replacement'],
|
|
'document_name' => $row['document_name'],
|
|
'date' => $row['date'],
|
|
'valid' => $row['valid'],
|
|
'comment' => $row['comment'],
|
|
]);
|
|
}
|
|
|
|
// public function headingRow(): int
|
|
// {
|
|
// return 3;
|
|
// }
|
|
|
|
}
|
|
|