akaunting/app/Imports/Sales/Sheets/InvoiceHistories.php

30 lines
537 B
PHP
Raw Normal View History

2019-11-16 10:21:14 +03:00
<?php
2019-12-31 15:49:09 +03:00
namespace App\Imports\Sales\Sheets;
2019-11-16 10:21:14 +03:00
2020-01-20 01:26:35 +03:00
use App\Abstracts\Import;
2019-12-31 15:49:09 +03:00
use App\Models\Sale\InvoiceHistory as Model;
use App\Http\Requests\Sale\InvoiceHistory as Request;
2019-11-16 10:21:14 +03:00
2020-01-20 01:26:35 +03:00
class InvoiceHistories extends Import
2019-11-16 10:21:14 +03:00
{
public function model(array $row)
{
return new Model($row);
}
2020-01-20 11:48:57 +03:00
public function map($row): array
{
$row = parent::map($row);
$row['notify'] = (int) $row['notify'];
return $row;
}
2019-11-16 10:21:14 +03:00
public function rules(): array
{
return (new Request())->rules();
}
2020-01-20 01:26:35 +03:00
}