root 5 years ago
parent
commit
1dd09eb1dd

+ 1
- 0
app/Http/Controllers/Api/CompoundController.php View File

$kpd = $request->get('kpd'); $kpd = $request->get('kpd');
$success_upload = 0; $count_upload = 0; $success_upload = 0; $count_upload = 0;
$compound = Compound::with('ConfidentialFile')->where('kpd', $kpd)->first(); $compound = Compound::with('ConfidentialFile')->where('kpd', $kpd)->first();
dd($kpd);
if(!empty($compound)){ if(!empty($compound)){
if($request->hasFile('file')) { if($request->hasFile('file')) {

+ 2
- 2
app/Http/Controllers/Api/CompoundResourceController.php View File



do { do {
$countKPD = $countKPD + 1; $countKPD = $countKPD + 1;
} while (Compound::where("kpd", "=", 'KP'.$countKPD)->first() instanceof Compound);
} while (!empty(Compound::where("kpd", "=", 'KP'.$countKPD)->first()));


$kpd = $countKPD;
$kpd = 'KP'.$countKPD;
$no_siri = date('yn').'-'.$countKPD; $no_siri = date('yn').'-'.$countKPD;


$fileData = [ $fileData = [

Loading…
Cancel
Save