PHP code example of shawnreid / laravel-quickbooks
1. Go to this page and download the library: Download shawnreid/laravel-quickbooks library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shawnreid / laravel-quickbooks example snippets
use Shawnreid\LaravelQuickbooks\Quickbooks;
class User extends Authenticatable
{
use Quickbooks;
$user = User::find(1);
$user
// resolve data service
->quickbooks()
// resolve invoice entity
->invoice()
// create invoice
->create(
body: [...]
)
$user
// resolve data service
->quickbooks()
// resolve customer entity
->customer()
// update customer
->update(
id: 'id'
body: [...]
)
$user
// resolve data service
->quickbooks()
// resolve bill entity
->bill()
// delete bill
->delete(
id: 'id'
)
$user
// resolve data service
->quickbooks()
// resolve vendor entity
->vendor()
// find vendor
->find(
id: 'id'
)
$user
// resolve data service
->quickbooks()
// Custom SQL query
// https://developer.intuit.com/app/developer/qbo/docs/learn/explore-the-quickbooks-online-api/data-queries
->query('SELECT * FROM Invoice')