PHPackages                             black-bits/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. black-bits/laravel-api-consumer

AbandonedLibrary[API Development](/categories/api)

black-bits/laravel-api-consumer
===============================

Awesome Laravel Api Consumer

0.2.2(7y ago)411399MITPHPPHP ^7.1

Since May 27Pushed 7y ago7 watchersCompare

[ Source](https://github.com/black-bits/laravel-api-consumer)[ Packagist](https://packagist.org/packages/black-bits/laravel-api-consumer)[ Docs](https://github.com/black-bits/larave-api-consumer)[ RSS](/packages/black-bits-laravel-api-consumer/feed)WikiDiscussions master Synced today

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/c6b49b2b02aca4ca78088e89a590484a7a2c401bba68efe0e1f2e1a9fc840153/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c61636b2d626974732f6c61726176656c2d6170692d636f6e73756d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/black-bits/laravel-api-consumer)[![Total Downloads](https://camo.githubusercontent.com/96b1f8ae8e84c6105adae60ddc96555b3ec914ce696617519d731ad24649bbdf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c61636b2d626974732f6c61726176656c2d6170692d636f6e73756d65722e7376673f7374796c653d666c61742d737175617265)](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 black-bits/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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

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

2898d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/12f99b0d20f4c0281e21cd28d12a44d2789c673a5bacade150d0e1150bdd9464?d=identicon)[oheck](/maintainers/oheck)

---

Top Contributors

[![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/black-bits-laravel-api-consumer/health.svg)

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

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)

PHPackages © 2026

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