@if ($document->status == 'IN_QUEUE') @php $url = 'https://imigresen-online.imi.gov.my/mdac/main?registerMain'; $url .= '&name=' . urlencode($document->data['acf']['name']); $url .= '&passNo=' . urlencode($document->data['acf']['passport_number']); $dob = str_replace('-', '/', $document->data['acf']['date_of_birth']); $dob = explode('/', $dob); $dob = $dob[2] . '/' . $dob[1] . '/' . $dob[0]; $url .= '&dob=' . urlencode($dob); $sex = '1'; if (strtolower($document->data['acf']['sex']) == 'female') { $sex = '2'; } $url .= '&sex=' . urlencode($sex); $passExpDte = str_replace('-', '/', $document->data['acf']['passport_expiry_date']); $passExpDte = explode('/', $passExpDte); $passExpDte = $passExpDte[2] . '/' . $passExpDte[1] . '/' . $passExpDte[0]; $url .= '&passExpDte=' . urlencode($passExpDte); $url .= '&email=' . urlencode($document->data['acf']['email']); $url .= '&confirmEmail=' . urlencode($document->data['acf']['email']); preg_match('/\d+/', $document->data['acf']['country'], $region); $url .= '®ion=' . urlencode($region[0]); $url .= '&mobile=' . urlencode(str_replace('+', '', $document->data['acf']['phone_number'])); $arrDt = str_replace('-', '/', $document->data['acf']['date_of_arrival']); $arrDt = explode('/', $arrDt); $arrDt = $arrDt[2] . '/' . $arrDt[1] . '/' . $arrDt[0]; $url .= '&arrDt=' . urlencode($arrDt); $depDt = str_replace('-', '/', $document->data['acf']['date_of_departure']); $depDt = explode('/', $depDt); $depDt = $depDt[2] . '/' . $depDt[1] . '/' . $depDt[0]; $url .= '&depDt=' . urlencode($depDt); $url .= '&vesselNm=' . urlencode($document->data['acf']['flight__vessel__transportation_no']); $url .= '&accommodationAddress1=' . urlencode($document->data['acf']['address_in_malaysia'] . ' Malasyia'); $url .= '&accommodationPostcode=' . urlencode($document->data['acf']['postcode']); $trvlMode = '1'; if (strtolower($document->data['acf']['mode_of_travel']) == 'land') { $trvlMode = '2'; } elseif (strtolower($document->data['acf']['mode_of_travel']) == 'sea') { $trvlMode = '3'; } $url .= '&trvlMode=' . urlencode($trvlMode); $accommodationStay = '01'; if (strtolower($document->data['acf']['accommodation_of_stay']) == 'residence of friends/relatives') { $accommodationStay = '02'; } elseif (strtolower($document->data['acf']['accommodation_of_stay']) == 'others') { $accommodationStay = '99'; } $url .= '&accommodationStay=' . urlencode($accommodationStay); @endphp
{{ __('Open Official Form') }}
@endif