https://github.com/cristalteam/php-api-wrapper
:rainbow: Work with APIs like with Laravel Eloquent or Doctrine (no longer a dream)
https://github.com/cristalteam/php-api-wrapper
api api-wrapper apiplatform doctrine eloquent laravel orm symfony wrapper
Last synced: about 1 month ago
JSON representation
:rainbow: Work with APIs like with Laravel Eloquent or Doctrine (no longer a dream)
- Host: GitHub
- URL: https://github.com/cristalteam/php-api-wrapper
- Owner: CristalTeam
- License: mit
- Created: 2020-04-08T08:46:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-18T09:21:42.000Z (7 months ago)
- Last Synced: 2025-08-29T14:10:31.137Z (about 1 month ago)
- Topics: api, api-wrapper, apiplatform, doctrine, eloquent, laravel, orm, symfony, wrapper
- Language: PHP
- Homepage:
- Size: 153 KB
- Stars: 124
- Watchers: 10
- Forks: 34
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP API Wrapper
[](https://packagist.org/packages/cristal/php-api-wrapper)
[](https://github.com/cristalTeam/php-api-wrapper/issues)
[](https://github.com/cristalTeam/php-api-wrapper/blob/master/LICENSE)PHP API Wrapper is a smart stack based on a couple of a Transport and a smart Wrapper for your API.
It is designed to be easily integrated into your projects thanks to bridges for **Laravel, Symfony, API Platform** and a **standalone stack**.## :rocket: Installation using Composer
```sh
composer require cristal/php-api-wrapper
```## :eyes: Quick view
```php
true])->get();foreach($activedUsers as $user){
$user->active = false;
$user->save();
}
```## :book: Chose your stack
### :point_right: Start without Laravel or Symfony
If you decide to work without Laravel or Symfony, PHP Api Wrapper comes with a standalone Builder and a Model largely inspired by Eloquent, but really standalone. I promise !
[Start without Laravel or Symfony](docs/work-standalone.md)
### :point_right: Start with Laravel
This is actualy the powerfull usage of API Wrapper. If you decide to use PHP API Wrapper with Laravel the integration approaches perfection. The builder returns Collections, all models are usable with the **Laravel Route Binding** (this is really impressive). And icing on the cake, **you can create complexes relations between Eloquent and PHP API Wrapper**.
[Start with Laravel](docs/work-with-laravel.md)
### :point_right: Start with Symfony (and optionally Api Platform)
This implementation is realy interesting too, the Symfony bridge provide you a Repository implementing the Doctrine RepositoryInterface which hydrates your entities. A Manager is also available which allows you to manage repositories and its connections. If you are using API Platform this is fully compatible. A API Platform Data Provider is also registered.
:warning: *Careful, this implementation is currently read-only. Help us to implement the missing parts !*
[Start with Symfony](docs/work-with-symfony.md)