|
|
@@ -88,6 +88,13 @@ class RestfulapiController extends BaseController |
|
|
|
// $faulty = Faulty::where('_id',$c->seksyen_kesalahan)->first();
|
|
|
|
// $akta = DeedLaw::where('_id',$faulty->deed_law_id)->first();
|
|
|
|
|
|
|
|
$cpn_date = ''; $cpn_time = '';
|
|
|
|
if (!empty($c->cpn_created))
|
|
|
|
{
|
|
|
|
$cpn_date = Carbon::parse($c->cpn_created)->format("D, d M, 'y");
|
|
|
|
$cpn_time = Carbon::parse($c->cpn_created)->format("g:i A");
|
|
|
|
}
|
|
|
|
|
|
|
|
if($c->jenis == 'Pelbagai_KT'){
|
|
|
|
array_push($data,array(
|
|
|
|
"_id" => $c->_id,
|
|
|
@@ -119,7 +126,8 @@ class RestfulapiController extends BaseController |
|
|
|
"updated_at" => $c->updated_at->toDateTimeString(),
|
|
|
|
"created_at" => $c->created_at->toDateTimeString(),
|
|
|
|
"notice_created" => $c->notice_created,
|
|
|
|
"compound_created" => $c->cpn_created,
|
|
|
|
"cpn_ctreted_date" => $cpn_date,
|
|
|
|
"cpn_ctreted_time" => $cpn_time,
|
|
|
|
));
|
|
|
|
}else if($c->jenis == 'Pelbagai_JPB'){
|
|
|
|
array_push($data,array(
|
|
|
@@ -152,7 +160,8 @@ class RestfulapiController extends BaseController |
|
|
|
"updated_at" => $c->updated_at->toDateTimeString(),
|
|
|
|
"created_at" => $c->created_at->toDateTimeString(),
|
|
|
|
"notice_created" => $c->notice_created,
|
|
|
|
"compound_created" => $c->cpn_created,
|
|
|
|
"compound_created" => $cpn_date,
|
|
|
|
"cpn_ctreted_time" => $cpn_time,
|
|
|
|
));
|
|
|
|
}else if($c->jenis == 'Pelbagai_LESEN'){
|
|
|
|
array_push($data,array(
|
|
|
@@ -185,7 +194,8 @@ class RestfulapiController extends BaseController |
|
|
|
"updated_at" => $c->updated_at->toDateTimeString(),
|
|
|
|
"created_at" => $c->created_at->toDateTimeString(),
|
|
|
|
"notice_created" => $c->notice_created,
|
|
|
|
"compound_created" => $c->cpn_created,
|
|
|
|
"compound_created" => $cpn_date,
|
|
|
|
"cpn_ctreted_time" => $cpn_time,
|
|
|
|
));
|
|
|
|
}else if($c->jenis == 'Pelbagai_PA'){
|
|
|
|
array_push($data,array(
|
|
|
@@ -219,7 +229,8 @@ class RestfulapiController extends BaseController |
|
|
|
"updated_at" => $c->updated_at->toDateTimeString(),
|
|
|
|
"created_at" => $c->created_at->toDateTimeString(),
|
|
|
|
"notice_created" => $c->notice_created,
|
|
|
|
"compound_created" => $c->cpn_created,
|
|
|
|
"compound_created" => $cpn_date,
|
|
|
|
"cpn_ctreted_time" => $cpn_time,
|
|
|
|
));
|
|
|
|
}else if($c->jenis == 'Parkir'){
|
|
|
|
array_push($data,array(
|
|
|
@@ -249,7 +260,8 @@ class RestfulapiController extends BaseController |
|
|
|
"updated_at" => $c->updated_at->toDateTimeString(),
|
|
|
|
"created_at" => $c->created_at->toDateTimeString(),
|
|
|
|
"notice_created" => $c->notice_created,
|
|
|
|
"compound_created" => $c->cpn_created,
|
|
|
|
"compound_created" => $cpn_date,
|
|
|
|
"cpn_ctreted_time" => $cpn_time,
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|