diegosouza /
laravel-zimbra
| 1 | <?php |
||
| 2 | |||
| 3 | namespace DiegoSouza\Zimbra; |
||
| 4 | |||
| 5 | use DiegoSouza\Zimbra\ZimbraApiClient; |
||
| 6 | use Illuminate\Support\ServiceProvider; |
||
| 7 | |||
| 8 | class ZimbraServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | public function register() |
||
| 11 | { |
||
| 12 | $host = config('zimbra.host'); |
||
| 13 | $emailDomain = config('zimbra.domain'); |
||
| 14 | $user = config('zimbra.api.user'); |
||
| 15 | $password = config('zimbra.api.password'); |
||
| 16 | $logger = $this->app->log; |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 17 | |||
| 18 | $this->app->singleton( |
||
| 19 | ZimbraApiClient::class, |
||
| 20 | function () use ($host, $emailDomain, $user, $password, $logger) { |
||
| 21 | return new ZimbraApiClient($host, $emailDomain, $user, $password, $logger); |
||
| 22 | } |
||
| 23 | ); |
||
| 24 | |||
| 25 | $this->app->alias(ZimbraApiClient::class, 'zimbra'); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function boot() |
||
| 29 | { |
||
| 30 | $this->publishes([ |
||
| 31 | __DIR__.'/../../../config/zimbra.php' => config_path('zimbra.php'), |
||
| 32 | ]); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |