Browse Source

to date time string

master
Siti Rahayu 5 years ago
parent
commit
93d35d157b
1 changed files with 16 additions and 17 deletions
  1. 16
    17
      app/Http/Controllers/Api/CompoundResourceController.php

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

"receipt" => '-', "receipt" => '-',
"modul" => '03', "modul" => '03',
"penguatkuasa" => '-', "penguatkuasa" => '-',
"created_c" => Carbon::now()->toISOString(),
"created_c" => Carbon::now()->toDateTimeString(),
]; ];


$file = ConfidentialFile::create($fileData); $file = ConfidentialFile::create($fileData);
$compound->status = 'Belum Bayar'; $compound->status = 'Belum Bayar';
$compound->modul = '03'; $compound->modul = '03';
$compound->no_akaun_lesen = $request->lesen; $compound->no_akaun_lesen = $request->lesen;
$compound->created_c = Carbon::now()->toISOString();
$compound->created_c = Carbon::now()->toDateTimeString();




}elseif($request->jenis == 'Pelbagai_JPB'){ }elseif($request->jenis == 'Pelbagai_JPB'){
$compound->status = 'Belum Bayar'; $compound->status = 'Belum Bayar';
$compound->modul = '03'; $compound->modul = '03';
$compound->no_akaun_lesen = $request->lesen; $compound->no_akaun_lesen = $request->lesen;
$compound->created_c = Carbon::now()->toISOString();
$compound->created_c = Carbon::now()->toDateTimeString();


} }


} }
} }



/** /**
* *
* Store a newly created notice * Store a newly created notice
// "maklumat_tambahan" => $request->butiran_kesalahan, // "maklumat_tambahan" => $request->butiran_kesalahan,
"tindakan" => $request->tindakan, "tindakan" => $request->tindakan,
"tempoh" => $request->tempoh, "tempoh" => $request->tempoh,
"tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toISOString(),
// "tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toiso(),
"created_n" => Carbon::now()->toDateTimeString(),
]; ];
}elseif($request->jenis == 'Notis_NMH'){ }elseif($request->jenis == 'Notis_NMH'){


// "maklumat_tambahan" => $request->butiran_kesalahan, // "maklumat_tambahan" => $request->butiran_kesalahan,
"tindakan" => $request->tinadkan, "tindakan" => $request->tinadkan,
"tempoh" => $request->tempoh, "tempoh" => $request->tempoh,
"tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toISOString(),
// "tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toDateTimeString(),
]; ];
} }
elseif($request->jenis == 'Notis_NHN'){ elseif($request->jenis == 'Notis_NHN'){
// "maklumat_tambahan" => $request->butiran_kesalahan, // "maklumat_tambahan" => $request->butiran_kesalahan,
// "tindakan" => $request->tindakan, // "tindakan" => $request->tindakan,
"tempoh" => $request->tempoh, "tempoh" => $request->tempoh,
"tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toISOString(),
// "tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toDateTimeString(),
]; ];
} }
elseif($request->jenis == 'Notis_PA'){ elseif($request->jenis == 'Notis_PA'){
// "maklumat_tambahan" => $request->butiran_kesalahan, // "maklumat_tambahan" => $request->butiran_kesalahan,
"tindakan" => $request->tindakan, "tindakan" => $request->tindakan,
"tempoh" => $request->tempoh, "tempoh" => $request->tempoh,
"tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toISOString(),
// "tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toDateTimeString(),
"bil_haiwan" => $request->bil_haiwan, "bil_haiwan" => $request->bil_haiwan,
]; ];
}elseif($request->jenis == 'Notis_NPPM'){ }elseif($request->jenis == 'Notis_NPPM'){
// "maklumat_tambahan" => $request->butiran_kesalahan, // "maklumat_tambahan" => $request->butiran_kesalahan,
"tindakan" => $request->tindakan, "tindakan" => $request->tindakan,
"tempoh" => $request->tempoh, "tempoh" => $request->tempoh,
"tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toISOString(),
// "tempoh_tarikh" => Carbon::now()->addDays($request->tempoh)->toISOString(),
"created_n" => Carbon::now()->toDateTimeString(),
]; ];
} }


"receipt" => '-', "receipt" => '-',
"modul" => '03', "modul" => '03',
"penguatkuasa" => '-', "penguatkuasa" => '-',
"created_c" => Carbon::now()->toISOString(),
"created_c" => Carbon::now()->toDateTimeString(),
]; ];
} }
if ($request->jenis == 'Pelbagai_KT') { if ($request->jenis == 'Pelbagai_KT') {
"modul" => $request->modul, "modul" => $request->modul,
"penguatkuasa" => '-', "penguatkuasa" => '-',
"no_akaun_lesen" => $request->lesen, "no_akaun_lesen" => $request->lesen,
"created_c" => Carbon::now()->toISOString(),
"created_c" => Carbon::now()->toDateTimeString(),
]; ];
} }
elseif ($request->jenis == 'Pelbagai_JPB') { elseif ($request->jenis == 'Pelbagai_JPB') {
"modul" => $request->modul, "modul" => $request->modul,
"penguatkuasa" => '-', "penguatkuasa" => '-',
"no_akaun_lesen" => $request->lesen, "no_akaun_lesen" => $request->lesen,
"created_c" => Carbon::now()->toISOString(),
"created_c" => Carbon::now()->toDateTimeString(),
]; ];
} }



Loading…
Cancel
Save