Update Pendidikan & Pelatihan
This commit is contained in:
@@ -72,6 +72,8 @@ class PendidikanPelatihanController extends Controller
|
||||
'jenis_pelatihan' => $item['jenis_pelatihan'] ?? null,
|
||||
'penyelenggara' => $item['penyelenggara'] ?? null,
|
||||
'tahun_pelaksanaan' => $item['tahun'] ?? null,
|
||||
'created_by' => auth()->id(),
|
||||
'updated_by' => auth()->id(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -84,6 +86,10 @@ class PendidikanPelatihanController extends Controller
|
||||
|
||||
abort_unless($surveyPelatihan->petani_id === $petani->id, 404);
|
||||
|
||||
$surveyPelatihan->update([
|
||||
'deleted_by' => auth()->id(),
|
||||
]);
|
||||
|
||||
$surveyPelatihan->delete();
|
||||
|
||||
return back()->with('success', 'Riwayat pelatihan berhasil dihapus.');
|
||||
@@ -144,6 +150,8 @@ class PendidikanPelatihanController extends Controller
|
||||
'lembaga_penerbit' => $item['lembaga_penerbit'] ?? null,
|
||||
'tahun_pelaksanaan' => $item['tahun'] ?? null,
|
||||
'is_aktif' => $item['status_berlaku_sertifikat'] ?? 0,
|
||||
'created_by' => auth()->id(),
|
||||
'updated_by' => auth()->id(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -156,6 +164,10 @@ class PendidikanPelatihanController extends Controller
|
||||
|
||||
abort_unless($surveySertifikasi->petani_id === $petani->id, 404);
|
||||
|
||||
$surveySertifikasi->update([
|
||||
'deleted_by' => auth()->id(),
|
||||
]);
|
||||
|
||||
$surveySertifikasi->delete();
|
||||
|
||||
return back()->with('success', 'Sertifikasi berhasil dihapus.');
|
||||
|
||||
Reference in New Issue
Block a user