{"id":30743184,"url":"https://github.com/cristalteam/php-api-wrapper","last_synced_at":"2025-09-04T02:04:04.023Z","repository":{"id":39971504,"uuid":"254033346","full_name":"CristalTeam/php-api-wrapper","owner":"CristalTeam","description":":rainbow: Work with APIs like with Laravel Eloquent or Doctrine (no longer a dream)","archived":false,"fork":false,"pushed_at":"2025-03-18T09:21:42.000Z","size":157,"stargazers_count":124,"open_issues_count":27,"forks_count":34,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-29T14:10:31.137Z","etag":null,"topics":["api","api-wrapper","apiplatform","doctrine","eloquent","laravel","orm","symfony","wrapper"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CristalTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-08T08:46:57.000Z","updated_at":"2025-07-07T23:05:46.000Z","dependencies_parsed_at":"2025-03-06T11:40:00.340Z","dependency_job_id":null,"html_url":"https://github.com/CristalTeam/php-api-wrapper","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/CristalTeam/php-api-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CristalTeam%2Fphp-api-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CristalTeam%2Fphp-api-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CristalTeam%2Fphp-api-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CristalTeam%2Fphp-api-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CristalTeam","download_url":"https://codeload.github.com/CristalTeam/php-api-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CristalTeam%2Fphp-api-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273539317,"owners_count":25123499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-wrapper","apiplatform","doctrine","eloquent","laravel","orm","symfony","wrapper"],"created_at":"2025-09-04T02:04:03.104Z","updated_at":"2025-09-04T02:04:04.012Z","avatar_url":"https://github.com/CristalTeam.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP API Wrapper\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/cristal/php-api-wrapper.svg?style=flat-square)](https://packagist.org/packages/cristal/php-api-wrapper)\n[![GitHub issues](https://img.shields.io/github/issues/cristalTeam/php-api-wrapper.svg?style=flat-square)](https://github.com/cristalTeam/php-api-wrapper/issues)\n[![GitHub license](https://img.shields.io/github/license/cristalTeam/php-api-wrapper.svg?style=flat-square)](https://github.com/cristalTeam/php-api-wrapper/blob/master/LICENSE)\n\nPHP API Wrapper is a smart stack based on a couple of a Transport and a smart Wrapper for your API. \nIt is designed to be easily integrated into your projects thanks to bridges for **Laravel, Symfony, API Platform** and a **standalone stack**.\n\n## :rocket: Installation using Composer\n\n```sh\ncomposer require cristal/php-api-wrapper\n```\n\n## :eyes: Quick view \n\n```php\n\u003c?php\n\n// Configure your API\n\nuse Cristal\\ApiWrapper\\Model;\nuse Cristal\\ApiWrapper\\Transports\\Basic;\nuse App\\User;\nuse Curl\\Curl;\n\n$transport = new Basic('username', 'password', 'http://api.example.com/v1/', new Curl);\n$api = new Api($transport);\n\nModel::setApi($api);\n\n// Use your model like Eloquent (Usage with Symfony is significantly different)\n\n$activedUsers = User::where(['active' =\u003e true])-\u003eget();\n\nforeach($activedUsers as $user){\n    $user-\u003eactive = false;\n    $user-\u003esave();\n}\n```\n\n## :book: Chose your stack\n\n### :point_right: Start without Laravel or Symfony\n\nIf 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 !\n\n[Start without Laravel or Symfony](docs/work-standalone.md)\n\n### :point_right: Start with Laravel\n\nThis 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**.\n\n[Start with Laravel](docs/work-with-laravel.md)\n\n\n### :point_right: Start with Symfony (and optionally Api Platform)\n\nThis 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.\n\n:warning: *Careful, this implementation is currently read-only. Help us to implement the missing parts !*\n\n[Start with Symfony](docs/work-with-symfony.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalteam%2Fphp-api-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristalteam%2Fphp-api-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalteam%2Fphp-api-wrapper/lists"}