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')

$user->quickbooks()->account();
$user->quickbooks()->bill();
$user->quickbooks()->billPayment();
$user->quickbooks()->customer();
$user->quickbooks()->estimate();
$user->quickbooks()->invoice();
$user->quickbooks()->item();
$user->quickbooks()->journalEntry();
$user->quickbooks()->payment();
$user->quickbooks()->timeActivity();
$user->quickbooks()->vendor();
$user->quickbooks()->vendorCredit();
$user->quickbooks()->companyCurrency();
$user->quickbooks()->creditMemo();
$user->quickbooks()->department();
$user->quickbooks()->deposit();
$user->quickbooks()->employee();
$user->quickbooks()->purchase();
$user->quickbooks()->purchaseOrder();
$user->quickbooks()->refundReceipt();
$user->quickbooks()->salesReceipt();
$user->quickbooks()->taxAgency();
$user->quickbooks()->taxRate();
$user->quickbooks()->taxService();
$user->quickbooks()->transfer();

$user->quickbooks()->invoice()->create([...]);
$user->quickbooks()->invoice()->update('id', [...]);
$user->quickbooks()->invoice()->delete('id');
$user->quickbooks()->invoice()->find('id');
bash
php artisan vendor:publish --provider="Shawnreid\LaravelQuickbooks\Providers\QuickbooksProvider"
bash
php artisan migrate
configs/laravel-quickbooks.php
configs/laravel-quickbooks.php