Move vaCentral config to its own config file and ServiceProvider
This commit is contained in:
parent
7cc3fc6a3a
commit
d90e118f56
19
app/Providers/vaCentralServiceProvider.php
Executable file
19
app/Providers/vaCentralServiceProvider.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use VaCentral\VaCentral;
|
||||
|
||||
/**
|
||||
* Bootstrap the vaCentral library
|
||||
* @package App\Providers
|
||||
*/
|
||||
class vaCentralServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function boot()
|
||||
{
|
||||
if(filled(config('vacentral.api_key'))) {
|
||||
VaCentral::setApiKey(config('vacentral.api_key'));
|
||||
}
|
||||
}
|
||||
}
|
@ -84,6 +84,7 @@ return [
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\vaCentralServiceProvider::class,
|
||||
],
|
||||
|
||||
'aliases' => [
|
||||
|
16
config/vacentral.php
Normal file
16
config/vacentral.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* vaCentral Configurations
|
||||
*/
|
||||
|
||||
return [
|
||||
/**
|
||||
* Your vaCentral API key
|
||||
*/
|
||||
'api_key' => env('VACENTRAL_API_KEY', ''),
|
||||
|
||||
/**
|
||||
* vaCentral API URL. You likely don't need to change this
|
||||
*/
|
||||
'api_url' => 'https://api.vacentral.net',
|
||||
];
|
@ -19,8 +19,6 @@ return [
|
||||
|
||||
# overrides phpvms.php
|
||||
'phpvms' => [
|
||||
'vacentral_api_key' => '',
|
||||
|
||||
/**
|
||||
* The ISO "Currency Code" to use, the list is in config/money.php
|
||||
*
|
||||
@ -35,6 +33,10 @@ return [
|
||||
'default' => 'default',
|
||||
],
|
||||
|
||||
'vacentral' => [
|
||||
'api_key' => '',
|
||||
],
|
||||
|
||||
# overrides cache.php
|
||||
'cache' => [
|
||||
'default' => '$CACHE_DRIVER$',
|
||||
|
Loading…
Reference in New Issue
Block a user