Add 'details' column to 'detail_dokumen_jaminan' table
This migration adds a nullable 'details' column to the 'detail_dokumen_jaminan' table. The column is used to store custom field data in JSON format. Various parts of the application, including the model, controller, and view, have been updated to handle this new column.
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
'dokumen_jaminan' => 'jaminan/' . $debitur->id . '/' . $document->id . '/' . $file_name,
|
||||
'name' => $request->name[$key],
|
||||
'keterangan' => $request->keterangan[$key],
|
||||
'details' => isset($request->custom_field[$key]) ? json_encode($request->custom_field[$key]) : '',
|
||||
];
|
||||
DetailDokumenJaminan::create($detail);
|
||||
} catch (Exception $e) {
|
||||
@@ -181,16 +182,19 @@
|
||||
|
||||
//dd($pemilik_jaminan);
|
||||
|
||||
try{
|
||||
try {
|
||||
$pemilikJaminan = PemilikJaminan::updateOrCreate([
|
||||
'debiture_id' => $id,
|
||||
'name' => request()->get('pemilik_name'),
|
||||
], $pemilik_jaminan);
|
||||
} catch (Exception $e){
|
||||
return redirect()->route('debitur.jaminan.index', $id)->with('error', 'Gagal update pemilik jaminan: '. $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
return redirect()->route('debitur.jaminan.index', $id)->with(
|
||||
'error',
|
||||
'Gagal update pemilik jaminan: ' . $e->getMessage(),
|
||||
);
|
||||
}
|
||||
|
||||
$validate['pemilik_jaminan_id']=$pemilikJaminan->id;
|
||||
$validate['pemilik_jaminan_id'] = $pemilikJaminan->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
'name',
|
||||
'dokumen_jaminan',
|
||||
'keterangan',
|
||||
|
||||
'details',
|
||||
'status',
|
||||
'authorized_at',
|
||||
'authorized_status',
|
||||
|
||||
Reference in New Issue
Block a user