Update Pendidikan & Pelatihan

This commit is contained in:
2026-07-12 23:00:58 +07:00
parent bcc15d5240
commit b445392e9f
2 changed files with 64 additions and 0 deletions
@@ -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.');