2021-03-25 17:59:02 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\App;
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2022-04-14 16:38:47 +02:00
|
|
|
use LDC\LDCCRM\CrmApiV2;
|
2021-03-25 17:59:02 +01:00
|
|
|
|
|
|
|
|
class CrmApiServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap the application services.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function boot()
|
|
|
|
|
{
|
2022-04-14 16:38:47 +02:00
|
|
|
App::singleton('crmAPI', function () {
|
|
|
|
|
return new CrmApiV2(
|
|
|
|
|
config('crm.endpoint'),
|
|
|
|
|
config('crm.token'),
|
|
|
|
|
config('crm.password')
|
|
|
|
|
);
|
2021-03-25 17:59:02 +01:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|