PHPackages                             furkanmeclis/ptt-kargo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. furkanmeclis/ptt-kargo

ActiveLibrary[API Development](/categories/api)

furkanmeclis/ptt-kargo
======================

Laravel package for PTT Cargo SOAP API integration

v0.1(5mo ago)04MITPHPPHP ^8.1CI failing

Since Jan 22Pushed 5mo agoCompare

[ Source](https://github.com/furkanmeclis/ptt-kargo)[ Packagist](https://packagist.org/packages/furkanmeclis/ptt-kargo)[ RSS](/packages/furkanmeclis-ptt-kargo/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

PTT Kargo Laravel Package
=========================

[](#ptt-kargo-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/622347d3cea44f63bd29870cb493781711fa451f3b0321e34202617e74cc8ec0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6675726b616e6d65636c69732f7074742d6b6172676f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/furkanmeclis/ptt-kargo)[![GitHub Tests Action Status](https://camo.githubusercontent.com/583d708f80611a9e90d4d0665294b08891eb6a936529b8b8c4db1bc68b352d0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6675726b616e6d65636c69732f7074742d6b6172676f2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/furkanmeclis/ptt-kargo/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/6ea6c09a0b24d34486671176eaa193ffb694edbd26863128122e9829c04a08e3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6675726b616e6d65636c69732f7074742d6b6172676f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/furkanmeclis/ptt-kargo)

Laravel package for PTT Cargo SOAP API integration with auto-generated classes from WSDL, retry mechanism, and logging.

Installation
------------

[](#installation)

```
composer require furkanmeclis/ptt-kargo
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="ptt-kargo-config"
```

Add to your `.env`:

```
PTT_KARGO_WSDL=https://pttws.ptt.gov.tr/PttBilgi/services/Sorgu?wsdl
PTT_KARGO_USERNAME=your_username
PTT_KARGO_PASSWORD=your_password
PTT_KARGO_TIMEOUT=30
PTT_KARGO_RETRY_COUNT=3
PTT_KARGO_RETRY_DELAY=500
PTT_KARGO_LOG_ENABLED=true
PTT_KARGO_ENVIRONMENT=test
```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use FurkanMeclis\PttKargo\Facades\PttKargo;
use FurkanMeclis\PttKargo\Data\InputMahalle;
use FurkanMeclis\PttKargo\Data\mahalleSorgula;

// Create request object
$input = new InputMahalle();
$input->setIl_id('34'); // Istanbul
$input->setIlce_id('1'); // Example district ID
$input->setKullanici(config('ptt-kargo.username'));
$input->setSifre(config('ptt-kargo.password'));

// Create SOAP request
$request = new mahalleSorgula($input);

// Call the service method
$response = PttKargo::mahalleSorgula($request);

// Access response data
$mahalleler = $response->getMahalleSorgulaResult();
```

### Alternative: Using the call method

[](#alternative-using-the-call-method)

```
use FurkanMeclis\PttKargo\Facades\PttKargo;
use FurkanMeclis\PttKargo\Data\InputMahalle;
use FurkanMeclis\PttKargo\Data\mahalleSorgula;

$input = new InputMahalle();
$input->setIl_id('34');
$input->setIlce_id('1');
$input->setKullanici(config('ptt-kargo.username'));
$input->setSifre(config('ptt-kargo.password'));

$request = new mahalleSorgula($input);

// Using the call method
$response = PttKargo::call('mahalleSorgula', [$request]);
```

### Available Service Methods

[](#available-service-methods)

The package includes all PTT Kargo SOAP service methods. Some examples:

- `mahalleSorgula` - Query neighborhoods
- `ilceSorgula` - Query districts
- `kargomatListesi` - Get cargo box list
- `kargoUcret` - Calculate cargo price
- `teslimSure` - Get delivery time
- `gonderiDurumAciklamaSorgula` - Query shipment status

All methods use the generated classes from `FurkanMeclis\PttKargo\Data` namespace.

### Automatic Features

[](#automatic-features)

The package automatically handles:

- **Retry logic** with exponential backoff (500ms → 1000ms → 2000ms)
- **Request/response logging** to `storage/logs/ptt-kargo.log`
- **Exception handling** (Authentication, Timeout, SOAP errors)

**Note:** This package includes auto-generated PHP classes from the PTT Kargo WSDL. The generated classes are already included and ready to use.

Testing
-------

[](#testing)

```
composer test
composer analyse
composer format
```

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance71

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/286faff943fc3453f69a6702fd3e6d794d430cb45404e2909142ad56b5a6dc9a?d=identicon)[furkanmeclis](/maintainers/furkanmeclis)

---

Top Contributors

[![furkanmeclis](https://avatars.githubusercontent.com/u/71632315?v=4)](https://github.com/furkanmeclis "furkanmeclis (3 commits)")

---

Tags

laravelsoappttptt-kargoptt-soap

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/furkanmeclis-ptt-kargo/health.svg)

```
[![Health](https://phpackages.com/badges/furkanmeclis-ptt-kargo/health.svg)](https://phpackages.com/packages/furkanmeclis-ptt-kargo)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1190.2k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
