PHPackages                             peter9x/laravel-provet-api - 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. peter9x/laravel-provet-api

ActiveLibrary

peter9x/laravel-provet-api
==========================

Laravel package for Provet API

v1.0.0(today)00MITPHP ^8.2

Since Jul 22Compare

[ Source](https://github.com/peter9x/laravel-provet-api)[ Packagist](https://packagist.org/packages/peter9x/laravel-provet-api)[ Docs](https://github.com/peter9x/laravel-provet-api)[ RSS](/packages/peter9x-laravel-provet-api/feed)WikiDiscussions Synced today

READMEChangelog (2)Dependencies (10)Versions (2)Used By (0)

 [![Build Status](https://github.com/peter9x/laravel-provet-api/actions/workflows/php.yml/badge.svg)](https://github.com/peter9x/laravel-provet-api/actions) [![Latest Stable Version](https://camo.githubusercontent.com/d8cc87b9073d30f91d1cf77df7446c8c2e59c97cc9bdb463d80807c657cd2f23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706574657239782f6c61726176656c2d70726f7665742d617069)](https://packagist.org/packages/peter9x/laravel-provet-api) [![License](https://camo.githubusercontent.com/de872882be7dc1d74d9fa3e0bd24c4aa7213e0127df1719790a80d9eeee5f9d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f706574657239782f6c61726176656c2d70726f7665742d617069)](https://packagist.org/packages/peter9x/laravel-provet-api)

Laravel Provet API
==================

[](#laravel-provet-api)

A Laravel package for communicating with the [Provet Cloud API](https://developers.provetcloud.com/restapi/0.1/).

Features
--------

[](#features)

- OAuth2 client-credentials authentication with token caching
- Multiple named connections (multi-tenant / multi-organization support)
- Typed, capability-safe resource path builders (`Client::all()`, `Patient::get(42)`, ...)
- Fluent filter/pagination query builder
- Automatic retries with 401/429 handling
- Lazy, memory-safe pagination for large datasets
- Laravel Facade

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

[](#installation)

```
composer require peter9x/laravel-provet-api
php artisan vendor:publish --provider="Mupy\\ProvetApi\\ProvetServiceProvider" --tag=config
```

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

[](#configuration)

Set your Provet credentials in `.env`:

```
PROVET_ID=7456
PROVET_CLIENT_ID=your-client-id
PROVET_CLIENT_SECRET=your-client-secret
```

For multiple tenants/organizations, add one entry per connection in `config/provet.php`:

```
'default' => env('PROVET_CONNECTION', '7456'),

'connections' => [
    '7456' => [
        'client_id' => env('PROVET_API_7456_ID'),
        'client_secret' => env('PROVET_API_7456_SECRET'),
    ],
    '2449' => [
        'client_id' => env('PROVET_API_2449_ID'),
        'client_secret' => env('PROVET_API_2449_SECRET'),
    ],
],
```

Usage
-----

[](#usage)

```
use Mupy\ProvetApi\Facades\Provet;
use Mupy\ProvetApi\Paths\Client;
use Mupy\ProvetApi\Paths\Query;
use Mupy\ProvetApi\Enums\Operator;

// Retrieve
$client = Provet::get(Client::get(42));

// List, with filters, ordering and pagination
$query = (new Query())
    ->where('email', Operator::ICONTAINS, 'acme')
    ->orderByDesc('created')
    ->perPage(50);

$clients = Provet::get(Client::all($query));

// Create / update / delete (only exposed on resources the API actually supports)
Provet::post(Client::create(), ['firstname' => 'Ada']);
Provet::patch(Client::update(42), ['firstname' => 'Ada Lovelace']);
Provet::delete(Client::delete(42));
```

### Dependency injection

[](#dependency-injection)

`ProvetClient` is bound as a singleton, so it can be injected instead of using the facade:

```
use Mupy\ProvetApi\ProvetClient;
use Mupy\ProvetApi\Paths\Client;

class SyncClientsController
{
    public function __construct(
        private readonly ProvetClient $provet,
    ) {}

    public function __invoke(int $id)
    {
        // Pass a connection name to use a tenant other than the default one.
        return $this->provet->connection('2449')->get(Client::get($id));
    }
}
```

### Multiple connections

[](#multiple-connections)

```
Provet::connection('2449')->get(Client::all());
```

### Pagination

[](#pagination)

`paginate()` streams results lazily, following the API's `next` links, so it's safe for endpoints with millions of records:

```
use Mupy\ProvetApi\Paths\Invoice;

foreach (Provet::paginate(Invoice::all()) as $invoice) {
    // one invoice at a time, no buffering
}

// Or with a stop condition and progress tracking:
Provet::paginate(Invoice::all())
    ->onPageEnd(fn ($page) => logger()->info("page done, next: {$page->next}"))
    ->each(function ($invoice) {
        // return false to stop early
    });
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c46d53963b1f619827ca21ca692e7172ccc9c84eff2e17c538e0da84c0e088d5?d=identicon)[eletronik](/maintainers/eletronik)

---

Tags

laravel

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/peter9x-laravel-provet-api/health.svg)

```
[![Health](https://phpackages.com/badges/peter9x-laravel-provet-api/health.svg)](https://phpackages.com/packages/peter9x-laravel-provet-api)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k96.5k1](/packages/mike-bronner-laravel-model-caching)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[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.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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