-
Notifications
You must be signed in to change notification settings - Fork 35
LUMEN
Paul edited this page Aug 29, 2017
·
1 revision
Lumen doesn't ship in quite the same was as the full-blown Laravel, so to get up and running quickly you need to:
- Change bootstrap/app.php to include:
$app->withFacades(true, [
'DrawMyAttention\XeroLaravel\Facades\XeroPrivate' => 'XeroPrivate',
]);
- After registering middleware, you need to register the service provider in the same file (
bootstrap/app.php
):$app->register(DrawMyAttention\XeroLaravel\Providers\XeroServiceProvider::class);
- Add a new directory to your config directory, name it
xero
, pop a new file in here called config.php, so it ends up asconfig/xero/config.php
- The contents of
config.php
comes from this repository, and you can find the file here: https://github.com/amochohan/xerolaravel/blob/master/config.php [https://github.com/amochohan/xerolaravel]
I've found if i inject \Laravel\Lumen\Application into my method i can then simply use the library like so:
$xero = $app->make('XeroPrivate');
$invoices = $xero->load('Accounting\\Invoice')->execute();