Download the PHP package responsilicious/laravel-quickbooks without Composer
On this page you can find all versions of the php package responsilicious/laravel-quickbooks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download responsilicious/laravel-quickbooks
More information about responsilicious/laravel-quickbooks
Files in responsilicious/laravel-quickbooks
Package laravel-quickbooks
Short Description Laravel Quickbooks integration
License MIT
Homepage https://github.com/LifeOnScreen/laravel-quickbooks
Informations about the package laravel-quickbooks
laravel-quickbooks
Take a look at contributing.md to see a to do list.
Installation
Via Composer
Publish package and run migrations
Usage
Configuration
These are the variables you need to set in your .env.
Token Handling
Since every application is setup differently, you will need to create a class that extends QuickBooksTokenHandler
to persist the tokens in your database. By default, the tokens are stored using the Laravel Cache API for 7 days.
For example, if you use the Laravel Options package you would create the following class somewhere in your project:
Then bind it in your AppServiceProvider.php
:
Connect QuickBooks account
To connect your application with your QuickBooks company you can use QuickBooksAuthenticator
helper.
It has two methods:
getAuthorizationUrl()
- Returns redirect URL and putsquickbooks_auth
cookie into Laravel cookie queue. Cookie is valid for 30 minutes.processHook()
- Validatesquickbooks_auth
cookie and sets realm id, access token and refresh token.
Usage example:
Sync Eloquent model to QuickBooks
You can either extend the LifeOnScreen\LaravelQuickBooks\QuickBooksEntity
class which is already
extending the Eloquent model or you can use the LifeOnScreen\LaravelQuickBooks\SyncsToQuickBooks
trait.
Then you have to define:
quickBooksResource
- One of the QuickBooks resources classes (e.g..\LifeOnScreen\LaravelQuickBooks\Resources\Company::class
).getQuickBooksArray()
- This method must return the associative array which will be synced to QuickBooks.quickBooksIdColumn
(optional) - The column to use for storing the QuickBooks ID (defaults toquickbooks_id
)
Usage example:
When you want to sync a resource you must call syncToQuickBooks()
. Method returns true if syncing is successful.
You can get last QuickBooks error with method getLastQuickBooksError()
.
Syncing example:
Using the QuickBooks Resource Classes
You can use the included resource classes in LifeOnScreen\LaravelQuickBooks\Resources
to create, update, and query resources from QuickBooks.
Examples:
See QuickBooksResource.php
for further documentation.
Changelog
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author instead of using the issue tracker.
Credits
License
MIT license. Please see the license file for more information.