update denah bisa upload pdf

This commit is contained in:
majid
2024-12-10 08:55:30 +07:00
parent bccc89f794
commit a4139c1e19
2 changed files with 76 additions and 23 deletions

View File

@@ -217,7 +217,7 @@ class SurveyorController extends Controller
try {
$maxSize = getMaxFileSize('Foto');
$validatedData = $request->validate([
'foto_denah' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'foto_denah' => 'required|file|mimes:jpeg,jpg,png,pdf,svg|max:'. $maxSize,
'luas' => 'required|numeric',
'permohonan_id' => 'required',
'jenis_jaminan_id' => 'required'
@@ -843,7 +843,7 @@ class SurveyorController extends Controller
$inspectionData = json_decode($inspeksi->data_form, true);
if (json_last_error() !== JSON_ERROR_NONE) {
throw new \Exception('Error decoding inspection data: ' . json_last_error_msg());
throw new \Exception('Harap mengisi form inspeksi terlebih dahulu.');
}
if ($inspeksi->data_pembanding) {