lemmotresto/laravel-moneybird

Fork of Casdr/laravel-moneybird. Moneybird package for Laravel based on Picq'ers client

v1.2.0 2021-01-12 15:51 UTC

This package is auto-updated.

Last update: 2024-10-27 19:07:36 UTC


README

Latest Version on Packagist Software License Total Downloads

This Laravel package is a wrapper for picqer/moneybird-php-client.

This is an updated and maintained fork of casdr/laravel-moneybird.

Install

Via Composer

$ composer require lemmotresto/laravel-moneybird

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider and the Facade to your config/app.php:

'providers' => [
  ...
  LemmoTresto\Moneybird\MoneybirdServiceProvider::class,
],
'aliases' => [
  ...
  'Moneybird' => LemmoTresto\Moneybird\MoneybirdFacade::class,
]

Then run the following command to publish the config to your config/ directory.

$ php artisan vendor:publish --tag=config

You then need to generate an application in the Moneybird interface and set the configuration in your environment file. See config/moneybird.php for all environment variables available.

Usage

$contact = Moneybird::contact();

$contact->company_name = 'BlaLabs';
$contact->firstname = 'Cas';
$contact->lastname = 'de Reuver';
$contact->save();

There is additional documentation on the MoneybirdFacade class using phpdoc annotations. For more usage information, see picqer/moneybird-php-client

Credits

License

The MIT License (MIT). Please see License File for more information.