Move vaCentral config to its own config file and ServiceProvider

This commit is contained in:
Nabeel Shahzad
2018-03-11 18:14:34 -05:00
parent 7cc3fc6a3a
commit d90e118f56
4 changed files with 40 additions and 2 deletions

View 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'));
}
}
}