PHPackages                             mandasa2022/drillcutmyob - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mandasa2022/drillcutmyob

ActiveLibrary[API Development](/categories/api)

mandasa2022/drillcutmyob
========================

A Laravel wrapper for MYOB Account Right v2

01PHP

Since Jun 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mandasa2022/drillcutmyob)[ Packagist](https://packagist.org/packages/mandasa2022/drillcutmyob)[ RSS](/packages/mandasa2022-drillcutmyob/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Drillcutmyob - MYOB in Laravel, made easy.
==========================================

[](#drillcutmyob---myob-in-laravel-made-easy)

[![Latest Version on Packagist](https://camo.githubusercontent.com/51c91eb9189eed7780f14ec4e272d81a6e0c80a47de65304dab94fbd1333b851/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616e64617361323032322f6472696c6c6375746d796f622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mandasa2022/drillcutmyob)[![Build Status](https://camo.githubusercontent.com/7427ce5b0c0be169686f0620e4ca84a34f5f41897c8d3dbc58cdeb64768d5325/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d616e64617361323032322f6472696c6c6375746d796f622f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mandasa2022/drillcutmyob)[![Quality Score](https://camo.githubusercontent.com/6af97d9ba37a611eb07ec3549f048653368aa6495a38cf6d6af472540579d1bd/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d616e64617361323032322f6472696c6c6375746d796f622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mandasa2022/drillcutmyob)[![Total Downloads](https://camo.githubusercontent.com/868a75c3de28fa3290013f336870e1f8e06cbab02416d3d3b5d5ad257f6c2424/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616e64617361323032322f6472696c6c6375746d796f622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mandasa2022/drillcutmyob)

A handy Laravel wrapper around MYOB AccountRight v2. This is still in alpha stage and will include breaking changes regularily. Full Readme in progress.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mandasa2022/drillcutmyob
```

Setup
-----

[](#setup)

ENV requirements:

```
MYOB_CLIENT_ID=
MYOB_CLIENT_SECRET=
MYOB_REDIRECT_URI=myob/login
MYOB_GRANT_TYPE=authorization_code
MYOB_SCOPE=CompanyFile

```

Publish the preset configuration to store your MYOB authentication details

```
php artisan vendor:publish --provider="Mandasa\Drillcutmyob\DrillcutmyobServiceProvider" --tag="migrations"
php artisan migrate
```

You'll now need to authenticate with something like the following:

```
use Mandasa\Drillcutmyob\Drillcutmyob;
use Mandasa\Drillcutmyob\Models\Remote\CompanyFile;
use Mandasa\Drillcutmyob\Models\Remote\Contact\Customer;

$drillcutmyob = new Drillcutmyob;
//Redirect your user to MYOB to authenticate account right v2
$drillcutmyob->authenticate()->getCode();
//When the code is returned, get your access token
$drillcutmyob->authenticate()->getToken();
//Now you can save your credentials like so
//You would first load the company files the MYOB user has access to
$drillcutmyob->of(CompanyFile::class)->load();
//Then save them like so (the username and passwords are Base64 encoded in Drillcutmyob)
$drillcutmyob->authenticate()->saveCompanyFileCredentials([
        'username' => 'USERNAME',
        'password' => 'PASSWORD',
        'company_file_guid' => 'COMPANY_FILE_GUID',
        'company_file_name' => 'COMPANY_FILE_NAME',
        'company_file_uri'  => 'COMPANY_FILE_URI''
]);
```

Usage
-----

[](#usage)

### Get

[](#get)

Once that's completed you'll be able to query the API as you normally would

```
//And now query the API with the supported models (and paginate if supported)
$drillcutmyob->of(Customer::class)->page(1); //page 1
//Or (if the Model is a paginted model it will stil default to pagination due to MYOB api restrictions)
$drillcutmyob->of(Customer::class)->load(); //page 1
$drillcutmyob->of(Customer::class)->load(2); //page 2

//You can also load the specified model by UID .. here replace UID with your customer UID
$drillcutmyob->of(Customer::class)->loadByUid('UID');

//Or just return the first from a search
$drillcutmyob->of(TaxCode::class)->whereCode('GST')->first();

//The customer class also has some helper function (whereEmail)
$drillcutmyob->of(Customer::class)->whereEmail('drillcutmyob@gmail.com')->get();
```

You can also expose the Raw API for MYOB if appropriate

```
$drillcutmyob->rawGet('/Contact/Employee');
$drillcutmyob->rawPost('/Contact/Employee', $data);
```

### Post

[](#post)

Once you're ready to post you can do the following, to, for example, save a Customer

```
$taxCode = $this->drillcutmyob->of(TaxCode::class)->whereCode('GST')->first();

$customer = (new Customer)->create([
    'CompanyName'    => 'Drillcut',
    'LastName'       => 'Phillips',
    'FirstName'      => 'Tim',
    'IsIndividual'   => false,
    "TaxCode"        => [
        "UID" => $taxCode['UID'],
    ],
    "FreightTaxCode" => [
        "UID" => $taxCode['UID'],
    ],
])

$drillcutmyob->save($customer);
```

### Testing

[](#testing)

```
composer test
```

### Todo:

[](#todo)

- Create API Auth.
- Create basic model syntax for retrieving data
- Implement base model for encodable data
- Create request class
- Clean up request class.
- Create get and set for appropriate models instead of current free-for-all
- Write tests
- Make OAuth2 request class less dependant on request class

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Luke Curtis](https://github.com/lukecurtis93)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/365e21d6e22e6cf4eb59a1f6320d9a83aee5ad6b474b9b1e4d0ab2487cac9bf0?d=identicon)[mandasa2022](/maintainers/mandasa2022)

---

Top Contributors

[![mandasa2022](https://avatars.githubusercontent.com/u/102715091?v=4)](https://github.com/mandasa2022 "mandasa2022 (6 commits)")[![mritunjayellementry](https://avatars.githubusercontent.com/u/43597001?v=4)](https://github.com/mritunjayellementry "mritunjayellementry (1 commits)")

### Embed Badge

![Health badge](/badges/mandasa2022-drillcutmyob/health.svg)

```
[![Health](https://phpackages.com/badges/mandasa2022-drillcutmyob/health.svg)](https://phpackages.com/packages/mandasa2022-drillcutmyob)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
