{"id":21026620,"url":"https://github.com/usamamuneerchaudhary/laraclient","last_synced_at":"2025-05-15T10:31:41.529Z","repository":{"id":147778347,"uuid":"618848699","full_name":"usamamuneerchaudhary/laraclient","owner":"usamamuneerchaudhary","description":"Package that simplifies the process of working with multiple APIs in Laravel","archived":false,"fork":false,"pushed_at":"2023-03-28T09:44:11.000Z","size":52,"stargazers_count":34,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-14T20:21:01.491Z","etag":null,"topics":["api-client","api-rest","http-client","http-requests","laravel","package","php","rest-api"],"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/usamamuneerchaudhary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-03-25T14:31:53.000Z","updated_at":"2024-02-11T02:27:08.000Z","dependencies_parsed_at":"2023-07-11T07:46:25.588Z","dependency_job_id":null,"html_url":"https://github.com/usamamuneerchaudhary/laraclient","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usamamuneerchaudhary%2Flaraclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usamamuneerchaudhary%2Flaraclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usamamuneerchaudhary%2Flaraclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usamamuneerchaudhary%2Flaraclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usamamuneerchaudhary","download_url":"https://codeload.github.com/usamamuneerchaudhary/laraclient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254322937,"owners_count":22051687,"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","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-client","api-rest","http-client","http-requests","laravel","package","php","rest-api"],"created_at":"2024-11-19T11:45:32.219Z","updated_at":"2025-05-15T10:31:41.519Z","avatar_url":"https://github.com/usamamuneerchaudhary.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![image](https://www.linkpicture.com/q/laraclient.jpg)](https://thewebtier.com)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/usamamuneerchaudhary/laraclient?style=flat-square)](https://packagist.org/packages/usamamuneerchaudhary/laraclient)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/usamamuneerchaudhary/laraclient/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/usamamuneerchaudhary/laraclient/?branch=main)\n[![CodeFactor](https://www.codefactor.io/repository/github/usamamuneerchaudhary/laraclient/badge)](https://www.codefactor.io/repository/github/usamamuneerchaudhary/laraclient)\n[![Build Status](https://scrutinizer-ci.com/g/usamamuneerchaudhary/laraclient/badges/build.png?b=main)](https://scrutinizer-ci.com/g/usamamuneerchaudhary/laraclient/build-status/main)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/usamamuneerchaudhary/laraclient/badges/code-intelligence.svg?b=main)](https://scrutinizer-ci.com/code-intelligence)\n[![Total Downloads](https://img.shields.io/packagist/dt/usamamuneerchaudhary/laraclient?style=flat-square)](https://packagist.org/packages/usamamuneerchaudhary/laraclient)\n[![Licence](https://img.shields.io/packagist/l/usamamuneerchaudhary/laraclient?style=flat-square)](https://github.com/usamamuneerchaudhary/laraclient/blob/HEAD/LICENSE.md)\n## Introduction\nLara Client simplifies the process of working with APIs in Laravel, making it easy to handle authentication, rate \nlimiting, and error handling. \nIt allows to set up several API connections in a central configuration file, specifying the credentials for each \nconnection. \nThe package also includes a cache layer to speed up requests, and a logging system to track API requests and responses for debugging purposes. \nWith Lara Client, developers can quickly integrate multiple APIs into their Laravel applications, reducing development \ntime and effort, and making it easier to manage API integrations over time.\n\nHere's a quick example of what you can do in your models to enable tagging:\n\n- *This package supports Laravel 10*\n- *Minimum PHP v8.1 supported*\n\n```php\nnamespace App\\Http\\Controllers;\n\nuse Usamamuneerchaudhary\\LaraClient\\LaraClient;\n\nclass ApiController extends Controller\n{\n    $client = new LaraClient('weatherapi');\n    $response = $client-\u003eget('current.json', ['q' =\u003e 'london']);\n    $currentWeather = $response-\u003egetData();\n    \n    $client2 = new LaraClient('geodb');\n    $georesponse = $client-\u003eget('countries');\n    $countries = $response-\u003egetData();\n    \n    ....\n    ....\n    \n}\n```\n\n## Installation\nYou can install the package via composer:\n\n`composer require usamamuneerchaudhary/laraclient`\n## Run Migrations\n\nOnce the package is installed, you can run migrations,\n\n`php artisan migrate`\n\n\n## Publish Config File\n```\n php artisan vendor:publish --provider=\"Usamamuneerchaudhary\\LaraClient\\LaraClientServiceProvider\" --tag=\"config\"\n``` \nThis will create a `lara_client.php` file, where you can define multiple third party API connections.\n\n## Service Provider\n\nDon't forget to add the ServiceProvider in `app.php`:\n\n```\n\\Usamamuneerchaudhary\\LaraClient\\LaraClientServiceProvider::class,\n```\n## Logging \u0026 Publish Views\n\nWe're using a logging table to store requests and responses, you can access this by the following route:\n```\nhttp://yourwebsite.com/laraclient/logs\n\n//to access logs for any specific endpoint\nhttp://yourwebsite.com/laraclient/logs?endpoint=https://weatherapi-com.p.rapidapi.com/current.json\n```\n## Tutorial\n[How to handle multiple API connections in Laravel](https://thewebtier.com/how-to-handle-multiple-api-connections-in-laravel)\n\n## Tests\n`composer test`\n\n## Security\nIf you discover any security related issues, please email hello@usamamuneer.me instead of using the issue tracker.\n\n## Credits\n\n- [Laravel](https://laravel.com)\n- [Usama Muneer](https://usamamuneer.me)\n- [All Contributors](https://github.com/usamamuneerchaudhary/laraclient/graphs/contributors)\n\n## License\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusamamuneerchaudhary%2Flaraclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusamamuneerchaudhary%2Flaraclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusamamuneerchaudhary%2Flaraclient/lists"}