PHP code example of casdr / laravel-moneybird

1. Go to this page and download the library: Download casdr/laravel-moneybird 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/ */

    

casdr / laravel-moneybird example snippets


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

return [
    'redirect_uri' => 'urn:ietf:wg:oauth:2.0:oob',
    'client_id' => 'ij8uhui34g1409fn', // The client ID of your Moneybird application
    'client_secret' => 'hu4ht89y0rfhbsduofas', // The client secret of your Moneybird application
    'authorization_token' => '', // The authorization token for your account (https://developer.moneybird.com/authentication/#authentication) (optional)
    'access_token' => '', // The access token for your account  (optional)
    'administration_id' => '' // The administration ID you want to use (optional)
];
bash
$ php artisan vendor:publish --tag=config
 php
$contact = Moneybird::contact();

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