|
|
|
@ -47,6 +47,9 @@ class ProjectController extends Controller
|
|
|
|
|
|
|
|
|
|
$data['created_by'] = $this->currentName; |
|
|
|
|
|
|
|
|
|
if(empty($data['phase_id'])) |
|
|
|
|
$data['phase_id'] = 1; |
|
|
|
|
|
|
|
|
|
$result = Project::create($data); |
|
|
|
|
|
|
|
|
|
if(!$result) |
|
|
|
@ -260,8 +263,9 @@ class ProjectController extends Controller
|
|
|
|
|
->first(); |
|
|
|
|
if($d->area_kerja != ''){ |
|
|
|
|
$d->geolocation = $this->httpReq($d->area_kerja); |
|
|
|
|
$d->geolocation = []; |
|
|
|
|
} else { |
|
|
|
|
$d->geolocation = ''; |
|
|
|
|
$d->geolocation = []; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -376,10 +380,12 @@ class ProjectController extends Controller
|
|
|
|
|
$ch = curl_init(); |
|
|
|
|
curl_setopt($ch, CURLOPT_URL, str_replace("ADDR", $search, API_GEOLOCATION)); |
|
|
|
|
|
|
|
|
|
// SSL important |
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); |
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
|
|
//curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); |
|
|
|
|
curl_setopt($ch, CURLOPT_VERBOSE, true); |
|
|
|
|
curl_setopt($ch, CURLOPT_STDERR, fopen('php://stderr', 'w')); |
|
|
|
|
|
|
|
|
|
$info = curl_getinfo($ch); |
|
|
|
|
|
|
|
|
|
$output = curl_exec($ch); |
|
|
|
|
curl_close($ch); |
|
|
|
@ -388,3 +394,4 @@ class ProjectController extends Controller
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|