Calcinai xero-php pass config times

I am trying to figure out how to get started with this package. I installed it through Composer and I can make it work using some instructions in readme, but at this point I have to pass config variables every time like this:

$config = ['oauth' => [ 
             'consumer_key'     => 'MYCONSUMERKEY',
             'consumer_secret'  => 'MYSECRETKEY',
             'rsa_private_key'  => 'file:///pathtokey',
             'rsa_public_key'   => 'file:///pathtopubkey'
          ];

$xero = new \XeroPHP\Application\PrivateApplication($config);

It seems to be flying in the face of everything I have done with Laravel before. Any packages that I have used in the past come with configuration files for customization and facade, so I'm not sure how to go here to install the configuration once, and then download this package as I need, with the configuration saved.

I would like to know what to do in such cases.

+4
source share
1 answer

PHP , Laravel. PHP, XeroPHP, ( ) , - PHP PHP. , , "Laravel", Laravel - , .

, XeroPHP. Packalyst Packagist, Laravel .

, - Amo Chohan ! Laravel XeroPHP.

, , - , , , , . (!) github, Laravel, .

+3

Source: https://habr.com/ru/post/1687844/


All Articles