PHP code example of sejongtf / laravel-unipass

1. Go to this page and download the library: Download sejongtf/laravel-unipass library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sejongtf / laravel-unipass example snippets


use Sejongtf\LaravelUnipass\Facades\Unipass;

// API001 수입 통관 진행정보
$cargo = Unipass::cargoClearance()->byCargoNo('00ANLU083N59007001');
$cargo = Unipass::cargoClearance()->byHouseBl('605118340404', 2026);
$cargo->status();                 // 통관진행상태
$cargo->summary()->containerNo;   // 컨테이너번호
$cargo->summary()->entryDateAt(); // 입항일자(Carbon)
foreach ($cargo->events as $e) { $e->processType; $e->shedName; }

// API002 수출이행 내역
$exp = Unipass::exportFulfillment()->byDeclarationNo('15210100057248');
$exp = Unipass::exportFulfillment()->byBl('SJBL0389056');
$exp->isCompleted();              // 선적완료 여부
$exp->summary?->exporterName;     // 수출자상호
foreach ($exp->shipments as $s) { $s->blNo; $s->departureDate; }

// API021 입항보고(해상)
$arr = Unipass::seaArrivalReport()->byCallSign('3FBO6');
$arr = Unipass::seaArrivalReport()->bySubmissionNo('16SRDJA0023');
$arr->first()?->vesselName;
$arr->first()?->arrivalAtCarbon();

// API020 컨테이너내역
$ctn = Unipass::containers()->byCargoNo('00ANLU083N59007001');
foreach ($ctn->containers as $c) { $c->number; $c->sizeTypeCode; $c->sealNumbers; }

// 미구현 API 임시 직접 호출 (crkyCn 은 직접 포함)
$raw = Unipass::client()->get('someQry/retrieveSome', ['crkyCn' => '...', 'foo' => 'bar']);
bash
php artisan unipass:track cargo     <화물관리번호>
php artisan unipass:track cargo     <HBL> --by=hbl --year=2026   # --by=mbl 도 가능
php artisan unipass:track export    <B/L>                        # --by=declaration 이면 수출신고번호로
php artisan unipass:track arrival   <선박호출부호>               # --by=submission 이면 입출항제출번호로
php artisan unipass:track container <화물관리번호>