akaunting/app/Imports/Settings/Categories.php

27 lines
491 B
PHP
Raw Normal View History

2021-02-14 12:52:00 +03:00
<?php
namespace App\Imports\Settings;
use App\Abstracts\Import;
use App\Http\Requests\Setting\Category as Request;
use App\Models\Setting\Category as Model;
class Categories extends Import
{
2023-03-07 15:18:14 +03:00
public $request_class = Request::class;
2021-02-14 12:52:00 +03:00
public function model(array $row)
{
return new Model($row);
}
2022-11-21 12:17:58 +03:00
public function map($row): array
{
$row = parent::map($row);
$row['type'] = $this->getCategoryType($row['type']);
return $row;
}
2021-02-14 12:52:00 +03:00
}