PHPackages                             perfect-space/laravel-api-consumer - 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. perfect-space/laravel-api-consumer

ActiveLibrary[API Development](/categories/api)

perfect-space/laravel-api-consumer
==================================

Awesome Laravel Api Consumer by black bits, edited by Perfect Space

0.2.2(8y ago)0941MITPHPPHP ^7.1CI failing

Since May 27Pushed 3y agoCompare

[ Source](https://github.com/Perfect-Space/laravel-api-consumer)[ Packagist](https://packagist.org/packages/perfect-space/laravel-api-consumer)[ Docs](https://github.com/black-bits/larave-api-consumer)[ RSS](/packages/perfect-space-laravel-api-consumer/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

API consumers for Laravel offering Eloquent style syntax
========================================================

[](#api-consumers-for-laravel-offering-eloquent-style-syntax)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2805aaaa8d2ce426cc3b588fdeccc7fb727e6c8a8ce8f491752f38f03d84ac0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706572666563742d73706163652f6c61726176656c2d6170692d636f6e73756d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/perfect-space/laravel-api-consumer)[![Total Downloads](https://camo.githubusercontent.com/4e19fd92393cc6be3aead6414f26457133cdc24ce4bf61d2328673b8395fae60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706572666563742d73706163652f6c61726176656c2d6170692d636f6e73756d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/black-bits/laravel-api-consumer)

This Laravel package lets you generate API Consumers with Endpoints and Shapes which usage is similar to Laravel's Eloquent models.

You can generate one Consumer per API service you want to consume. Each Consumer can have any number of Endpoints with multiple Shapes.

An Endpoint represents e.g. a resource on a REST API like /users. Endpoints return Collections of Shapes. You can model the methods the API offers here.

A Shape represents an Object returned by an Endpoint and allows you to e.g. transform or validate the Object's properties.

### Disclaimer

[](#disclaimer)

*This package is currently in development and is not production ready.*

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

[](#installation)

You can install the package via composer

```
composer require perfect-space/laravel-api-consumer
```

Next you can publish the config

```
php artisan vendor:publish --provider="BlackBits\ApiConsumer\ApiConsumerServiceProvider"
```

Usage
-----

[](#usage)

To make a new Api Consumer Service you can simply run

```
php artisan make:api-consumer ConsumerName
```

To add an endpoint (e.g. UserEndpoint) to this service run the following command, this will also create a default shape (UserShape) for that Endpoint

```
php artisan make:api-consumer-endpoint UserEndpoint -c ConsumerName
```

To add a custom Collection Callback run the following command. You can use this e.g. to create a filter that only shows Users that receive a newsletter

```
php artisan make:api-consumer-collection-callback ReceivesNewsletter
```

You can find an example implementation here: [black-bits/laravel-api-consumer-showcase](https://github.com/black-bits/laravel-api-consumer-showcase)

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Oliver Heck](https://github.com/oheck)
- [Andreas Przywara](https://github.com/aprzywara)
- [Adrian Raeuchle](https://github.com/araeuchle)
- [All Contributors](../../contributors)

Support us
----------

[](#support-us)

Black Bits, Inc. is a web and consulting agency specialized in Laravel and AWS based in Grants Pass, Oregon. You'll find an overview of what we do [on our website](https://blackbits.io).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.9% 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

Every ~2 days

Total

4

Last Release

2941d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/198798?v=4)[Nate Ritter](/maintainers/nateritter)[@nateritter](https://github.com/nateritter)

---

Top Contributors

[![nateritter](https://avatars.githubusercontent.com/u/198798?v=4)](https://github.com/nateritter "nateritter (17 commits)")[![aprzywara](https://avatars.githubusercontent.com/u/10901792?v=4)](https://github.com/aprzywara "aprzywara (3 commits)")[![oheck](https://avatars.githubusercontent.com/u/10670394?v=4)](https://github.com/oheck "oheck (3 commits)")

---

Tags

laravelblackbitsapi-consumerlaravel api consumer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/perfect-space-laravel-api-consumer/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

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

PHPackages © 2026

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