New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

pkgdist/pkgdist-client

Client for the PKG-DIST api
1,011

Larablocks Analysis

pkgdist/pkgdist-client works with Laravel 10 to 13 (latest release 1.1.1, Jul 15, 2026).

Promising: maintained and up to date, meets 2 of 4 checks; not yet widely used.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Jul 15, 2026)
  • 26 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Jul 15, 2026.
  • 2 releases in the last 12 months.
  • First released: May 9, 2024.
  • Monthly downloads: 26.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.

Install
composer require pkgdist/pkgdist-client
Latest Version:1.1.1
PHP:^8.2
Laravel:10 – 13
License:GPL-3.0-only
Last Updated:Jul 15, 2026
Links: GitHub  ·  Packagist
Maintainer: SebastiaanKloos

pkgdist-client

PHP client for the PKG-DIST API. Built for Laravel — auto-discovers, exposes a small Package class, and adds an Http::pkgdist() macro.

Requirements

  • PHP ^8.2
  • Laravel ^10, ^11, ^12, or ^13

Installation

composer require pkgdist/pkgdist-client

The service provider is auto-discovered. No manual registration needed.

Configuration

Set the endpoint base host in your .env:

PKGDIST_CLIENT_ENDPOINT=pkg-dist.com

Optionally publish the config to override it directly:

php artisan vendor:publish --tag=config --provider="Pkgdist\Client\ClientServiceProvider"
// config/pkgdist-client.php
return [
    'endpoint' => env('PKGDIST_CLIENT_ENDPOINT'),
];

Usage

Loading a package

use Pkgdist\Client\Package;

$package = Package::load(
    package: 'vendor/package-name',
    slug: 'your-tenant-slug',
    token: 'your-license-token',
);

The slug is combined with the configured endpoint to form the API base URL — e.g. https://your-tenant-slug.pkg-dist.com/api.

Fetching changelogs

changelogs() returns an Illuminate\Support\Collection of Changelog objects:

$changelogs = $package->changelogs();

foreach ($changelogs as $changelog) {
    echo $changelog->version;     // e.g. "1.2.0"
    echo $changelog->content;     // markdown release notes
    echo $changelog->created_at;  // ISO-8601 timestamp
}

Because it's a Laravel Collection, you can chain the usual helpers:

$latest = $package->changelogs()->first();

$recent = $package->changelogs()
    ->sortByDesc('created_at')
    ->take(5);

The Http::pkgdist() macro

The service provider registers a macro on Laravel's HTTP client that pre-configures the base URL, so you can make ad-hoc requests against the API without instantiating Package:

use Illuminate\Support\Facades\Http;

$response = Http::pkgdist()
    ->withToken($licenseToken)
    ->get('some/endpoint');

Testing

composer test

Tests use Pest and Orchestra Testbench.

License

GPL-3.0-only. See LICENSE.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP Laravel License
1.1.1 ^8.2 ^10|^11|^12|^13 GPL-3.0-only
1.1.0 ^8.2 ^10|^11|^12|^13 GPL-3.0-only
1.0.0 ^8.2 ^10|^11 GPL-3.0-only