Upload Data temp realisasi belanja dbh
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace App\Imports;
|
||||
use App\Models\TempRealisasiBelanja;
|
||||
use Maatwebsite\Excel\Concerns\ToModel;
|
||||
use Maatwebsite\Excel\Concerns\Importable;
|
||||
use Maatwebsite\Excel\Concerns\WithStartRow;
|
||||
|
||||
class RealisasiBelanjaImport implements ToModel, WithStartRow
|
||||
{
|
||||
use Importable;
|
||||
|
||||
public function startRow(): int
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function model(array $row)
|
||||
{
|
||||
return new TempRealisasiBelanja([
|
||||
"tahun_anggaran"=>$row[0],
|
||||
"jenis_belanja"=>$row[1],
|
||||
"sub_jenis_belanja"=>$row[2],
|
||||
"kode_program"=>$row[3],
|
||||
"nama_program"=>$row[4],
|
||||
"kode_skpd"=>$row[5],
|
||||
"nama_skpd"=>$row[6],
|
||||
"kode_kegiatan"=>$row[7],
|
||||
"nama_kegiatan"=>$row[8],
|
||||
"kode_sub_kegiatan"=>$row[9],
|
||||
"nama_sub_kegiatan"=>$row[10],
|
||||
"kode_rsk"=>$row[11],
|
||||
"nama_rsk"=>$row[12],
|
||||
"kode_rekening"=>$row[13],
|
||||
"nama_rekening"=>$row[14],
|
||||
"jumlah_anggaran"=>$row[15],
|
||||
"volume_satuan"=>$row[16],
|
||||
"unit_satuan"=>$row[17]
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user