1 | <?php |
||
2 | |||
3 | namespace PragmaBroadvertising\SolarEdge; |
||
4 | |||
5 | use Illuminate\Support\ServiceProvider; |
||
6 | use PragmaBroadvertising\SolarEdge\Models\SolarEdge; |
||
7 | use PragmaBroadvertising\SolarEdge\Models\SolarEdgeClient; |
||
8 | |||
9 | class SolarEdgeServiceProvider extends ServiceProvider |
||
10 | { |
||
11 | /** |
||
12 | * Bootstrap the application services. |
||
13 | * |
||
14 | * @return void |
||
15 | */ |
||
16 | public function boot() |
||
17 | { |
||
18 | $this->publishes([ |
||
19 | __DIR__ . '/config/main.php' => config_path('laravel-solaredge-api.php') |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
20 | ], 'laravel-solaredge-api'); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Register the application services. |
||
25 | */ |
||
26 | public function register() |
||
27 | { |
||
28 | $this->mergeConfigFrom( |
||
29 | __DIR__ . '/config/main.php', 'laravel-solaredge-api' |
||
30 | ); |
||
31 | |||
32 | $this->app->register('Ixudra\Curl\CurlServiceProvider'); |
||
33 | |||
34 | $this->app->bind('solaredge', function() { |
||
35 | return new SolarEdge(new SolarEdgeClient()); |
||
36 | }); |
||
37 | } |
||
38 | } |
||
39 |