PHP code example of waltersilvacruz / laravel-quickbooks-client
1. Go to this page and download the library: Download waltersilvacruz/laravel-quickbooks-client 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/ */
waltersilvacruz / laravel-quickbooks-client example snippets
class User extends Authenticatable
{
use Notifiable, HasQuickBooksToken;
php artisan tinker
Psy Shell v0.8.17 (PHP 7.1.14 — cli) by Justin Hileman
>>> Auth::logInUsingId(1)
=> App\Databases\Models\User {#1668
id: 1,
// Other keys removed for example
}
>>> $quickbooks = app('WebDEV\QuickBooks\Client') // or app('QuickBooks')
=> WebDEV\QuickBooks\Client {#1613}
>>> $quickbooks->getDataService()->getCompanyInfo();
=> QuickBooksOnline\API\Data\IPPCompanyInfo {#1673
+CompanyName: "Sandbox Company_US_1",
+LegalName: "Sandbox Company_US_1",
// Other properties removed for example
}
>>>
Route::view('some/route/needing/quickbooks/token/before/using', 'some.view')
->middleware('quickbooks');
bash
$ php artisan migrate --package=waltersilvacruz/laravel-quickbooks-client
configs/quickbooks.php
quickbooks.php
bash
php artisan vendor:publish --tag=quickbooks-config
bash
php artisan vendor:publish --tag=quickbooks-views