PHP code example of myleshyson / laravel-quickbooks
1. Go to this page and download the library: Download myleshyson/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/ */
// routes/web.php
use Myleshyson\LaravelQuickBooks\Facades\Connection;
Route::get('/connect', function () {
Connection::start();
});
// routes/web.php
use Myleshyson\LaravelQuickBooks\Facades\Connection;
Route::get('/disconnect', function () {
Connection::stop();
});
// routes/web.php
use Myleshyson\LaravelQuickBooks\Facades\Connection;
Route::get('/check-connection', function () {
dd(Connection::check());
//true
});
Customer::create(array $data);
Customer::update($id, array $data);
Customer::delete($id);
Customer::find($id);
Customer::get(); //gets all customers associated with your account.
Customer::query('SELECT * FROM CUSTOMER WHERE ...') //put in your own custom query for the Customer table.