feat(laporan-admin-kredit): tambahkan fitur laporan admin kredit
- Menambahkan model LaporanAdminKredit. - Menambahkan controller LaporanAdminKreditController dengan metode untuk menampilkan dan mengelola data. - Menambahkan rute untuk laporan admin kredit. - Menambahkan breadcrumb untuk navigasi laporan admin kredit. - Menambahkan migrasi untuk tabel laporan_admin_kredit. - Menambahkan relasi di model Debiture untuk laporan admin kredit.
This commit is contained in:
@@ -64,4 +64,9 @@
|
||||
return $this->hasOne(Permohonan::class, 'debiture_id', 'id' );
|
||||
}
|
||||
|
||||
public function laporanAdminKredit(): HasMany
|
||||
{
|
||||
return $this->hasMany(LaporanAdminKredit::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
37
app/Models/LaporanAdminKredit.php
Normal file
37
app/Models/LaporanAdminKredit.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class LaporanAdminKredit extends Base
|
||||
{
|
||||
protected $table = 'laporan_admin_kredit';
|
||||
|
||||
protected $fillable = [
|
||||
'debiture_id',
|
||||
'kode_register_t24',
|
||||
'jenis_agunan',
|
||||
'bukti_kepemilikan',
|
||||
'alamat_agunan',
|
||||
'nama_pemilik',
|
||||
'tanggal_kunjungan',
|
||||
'nilai_pasar_wajar',
|
||||
'nilai_likuidasi',
|
||||
'nama_penilai'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'tanggal_kunjungan' => 'date',
|
||||
'nilai_pasar_wajar' => 'decimal:2',
|
||||
'nilai_likuidasi' => 'decimal:2',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the debiture that owns the laporan admin kredit.
|
||||
*/
|
||||
public function debiture(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Debiture::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user