30 lines
528 B
PHP
30 lines
528 B
PHP
<?php
|
|
|
|
namespace App\Imports\Purchases\Sheets;
|
|
|
|
use App\Abstracts\Import;
|
|
use App\Models\Banking\Transaction as Model;
|
|
use App\Http\Requests\Banking\Transaction as Request;
|
|
|
|
class BillTransactions extends Import
|
|
{
|
|
public function model(array $row)
|
|
{
|
|
return new Model($row);
|
|
}
|
|
|
|
public function map($row): array
|
|
{
|
|
$row = parent::map($row);
|
|
|
|
$row['type'] = 'expense';
|
|
|
|
return $row;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return (new Request())->rules();
|
|
}
|
|
}
|