PHP code example of mohamedhekal / shipbridge-yurtici
1. Go to this page and download the library: Download mohamedhekal/shipbridge-yurtici 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/ */
mohamedhekal / shipbridge-yurtici example snippets
use Hekal\ShipBridge\Facades\ShipBridge;
use Hekal\ShipBridge\DTOs\Address;
use Hekal\ShipBridge\DTOs\CreateShipmentRequest;
use Hekal\ShipBridge\DTOs\Parcel;
$shipment = ShipBridge::driver('yurtici')->createShipment(new CreateShipmentRequest(
origin: new Address('Depo', 'Sanayi Cd 1', 'İstanbul', 'TR', phone: '02121234567'),
destination: new Address('Mehmet Yılmaz', 'Eski Büyükdere Cd 3', 'İstanbul', 'TR', state: 'Maslak', phone: '05554443322'),
parcels: [new Parcel(weightKg: 2.5, description: 'Elektronik')],
reference: 'ORD-001',
metadata: ['desi' => 3],
));
echo $shipment->trackingNumber; // cargoKey
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.