{"id":34638259,"url":"https://github.com/spinen/laravel-quickbooks-client","last_synced_at":"2025-12-24T17:12:27.683Z","repository":{"id":30826246,"uuid":"126117580","full_name":"spinen/laravel-quickbooks-client","owner":"spinen","description":"SPINEN's Laravel Client for QuickBooks.","archived":false,"fork":false,"pushed_at":"2024-06-05T18:50:02.000Z","size":91,"stargazers_count":47,"open_issues_count":7,"forks_count":70,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-10-20T23:56:56.358Z","etag":null,"topics":["api","api-client","client","laravel","quickbooks","spinen"],"latest_commit_sha":null,"homepage":"https://spinen.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spinen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-03-21T03:24:36.000Z","updated_at":"2025-06-02T07:57:06.000Z","dependencies_parsed_at":"2024-06-21T14:12:23.198Z","dependency_job_id":"18acedfa-a035-4da0-a870-84c6988d394f","html_url":"https://github.com/spinen/laravel-quickbooks-client","commit_stats":{"total_commits":104,"total_committers":6,"mean_commits":"17.333333333333332","dds":"0.41346153846153844","last_synced_commit":"0ebbd3e542bda4f0538c91e9bdcae35d278fedf5"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/spinen/laravel-quickbooks-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinen%2Flaravel-quickbooks-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinen%2Flaravel-quickbooks-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinen%2Flaravel-quickbooks-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinen%2Flaravel-quickbooks-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spinen","download_url":"https://codeload.github.com/spinen/laravel-quickbooks-client/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinen%2Flaravel-quickbooks-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28005414,"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-12-24T02:00:07.193Z","response_time":83,"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-client","client","laravel","quickbooks","spinen"],"created_at":"2025-12-24T17:10:49.008Z","updated_at":"2025-12-24T17:12:27.664Z","avatar_url":"https://github.com/spinen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SPINEN's Laravel QuickBooks Client\n\n[![Latest Stable Version](https://poser.pugx.org/spinen/laravel-quickbooks-client/v/stable)](https://packagist.org/packages/spinen/laravel-quickbooks-client)\n[![Latest Unstable Version](https://poser.pugx.org/spinen/laravel-quickbooks-client/v/unstable)](https://packagist.org/packages/spinen/laravel-quickbooks-client)\n[![Total Downloads](https://poser.pugx.org/spinen/laravel-quickbooks-client/downloads)](https://packagist.org/packages/spinen/laravel-quickbooks-client)\n[![License](https://poser.pugx.org/spinen/laravel-quickbooks-client/license)](https://packagist.org/packages/spinen/laravel-quickbooks-client)\n\nPHP client wrapping the [QuickBooks PHP SDK](https://github.com/intuit/QuickBooks-V3-PHP-SDK).\n\nWe solely use [Laravel](https://www.laravel.com) for our applications, so this package is written with Laravel in mind. If there is a request from the community to split this package into 2 parts to allow it to be used outside of Laravel, then we will consider doing that work.\n\n## Build Status\n\n| Branch | Status | Coverage | Code Quality |\n| ------ | :----: | :------: | :----------: |\n| Develop | [![Build Status](https://github.com/spinen/laravel-quickbooks-client/workflows/CI/badge.svg?branch=develop)](https://github.com/spinen/laravel-quickbooks-client/workflows/CI/badge.svg?branch=develop) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/badges/coverage.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/?branch=develop) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/?branch=develop) |\n| Master | [![Build Status](https://github.com/spinen/laravel-quickbooks-client/workflows/CI/badge.svg?branch=master)](https://github.com/spinen/laravel-quickbooks-client/workflows/CI/badge.svg?branch=master) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/?branch=master) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-quickbooks-client/?branch=master) |\n\n## Installation\n\n1. Install QuickBooks PHP Client:\n\n```bash\n$ composer require spinen/laravel-quickbooks-client\n```\n\n2. Run our migration to install the `quickbooks_tokens` table:\n\n```bash\n$ php artisan migrate --package=spinen/laravel-quickbooks-client\n```\n\nThe package uses the [auto registration feature](https://laravel.com/docs/packages#package-discovery) of Laravel.\n\n## Configuration\n\n1. You will need a ```quickBooksToken``` relationship on your ```User``` model.  There is a trait named ```Spinen\\QuickBooks\\HasQuickBooksToken```, which you can include on your ```User``` model, which will setup the relationship. To do this implement the following:\n\nAdd ```use Spinen\\QuickBooks\\HasQuickBooksToken;``` to your service container at the top of User.php\nand also add the trait within the class. For example:\n\n```php\nclass User extends Authenticatable\n{\n    use Notifiable, HasQuickBooksToken;\n```\n\n**NOTE: If your ```User``` model is not ```App\\Models\\User```, then you will need to configure the path in the ```configs/quickbooks.php```.**\n\n2. Add the appropriate values to your ```.env```\n\n    #### Minimal Keys\n    ```bash\n    QUICKBOOKS_CLIENT_ID=\u003cclient id given by QuickBooks\u003e\n    QUICKBOOKS_CLIENT_SECRET=\u003cclient secret\u003e\n    ```\n\n    #### Optional Keys\n    ```bash\n    QUICKBOOKS_API_URL=\u003cDevelopment|Production\u003e # Defaults to App's env value\n    QUICKBOOKS_DEBUG=\u003ctrue|false\u003e               # Defaults to App's debug value\n    ```\n\n3. _[Optional]_ Publish configs \u0026 views\n\n    #### Config\n    A configuration file named ```quickbooks.php``` can be published to ```config/``` by running...\n\n    ```bash\n    php artisan vendor:publish --tag=quickbooks-config\n    ```\n\n    #### Views\n    View files can be published by running...\n\n    ```bash\n    php artisan vendor:publish --tag=quickbooks-views\n    ```\n\n## Usage\n\nHere is an example of getting the company information from QuickBooks:\n\n### NOTE: Before doing these commands, go to your connect route (default: /quickbooks/connect) to get a QuickBooks token for your user\n\n```php\nphp artisan tinker\nPsy Shell v0.8.17 (PHP 7.1.14 — cli) by Justin Hileman\n\u003e\u003e\u003e Auth::logInUsingId(1)\n=\u003e App\\Models\\User {#1668\n     id: 1,\n     // Other keys removed for example\n   }\n\u003e\u003e\u003e $quickbooks = app('Spinen\\QuickBooks\\Client') // or app('QuickBooks')\n=\u003e Spinen\\QuickBooks\\Client {#1613}\n\u003e\u003e\u003e $quickbooks-\u003egetDataService()-\u003egetCompanyInfo();\n=\u003e QuickBooksOnline\\API\\Data\\IPPCompanyInfo {#1673\n     +CompanyName: \"Sandbox Company_US_1\",\n     +LegalName: \"Sandbox Company_US_1\",\n     // Other properties removed for example\n   }\n\u003e\u003e\u003e\n```\n\nYou can call any of the resources as documented [in the SDK](https://intuit.github.io/QuickBooks-V3-PHP-SDK/quickstart.html).\n\n## Middleware\n\nIf you have routes that will be dependent on the user's account having a usable QuickBooks OAuth token, there is an included middleware ```Spinen\\QuickBooks\\Laravel\\Filter``` that gets registered as ```quickbooks``` that will ensure the account is linked and redirect them to the `connect` route if needed.\n\nHere is an example route definition:\n\n```php\nRoute::view('some/route/needing/quickbooks/token/before/using', 'some.view')\n     -\u003emiddleware('quickbooks');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinen%2Flaravel-quickbooks-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspinen%2Flaravel-quickbooks-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinen%2Flaravel-quickbooks-client/lists"}