Skip to content

Commit 1cc4c03

Browse files
committed
add service provider
1 parent a4be611 commit 1cc4c03

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/JiraRestApiServiceProvider.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
namespace JiraRestApi;
3+
4+
use Illuminate\Support\ServiceProvider;
5+
use Illuminate\Foundation\AliasLoader;
6+
7+
use JiraRestApi\Configuration\ConfigurationInterface;
8+
use JiraRestApi\Configuration\DotEnvConfiguration;
9+
10+
class JiraRestApiServiceProvider extends ServiceProvider
11+
{
12+
/**
13+
* Indicates if loading of the provider is deferred.
14+
*
15+
* @var bool
16+
*/
17+
protected $defer = false;
18+
19+
/**
20+
* Bootstrap the application events.
21+
*
22+
* @return void
23+
*/
24+
public function boot()
25+
{
26+
}
27+
28+
/**
29+
* Register bindings in the container.
30+
*
31+
* @return void
32+
*/
33+
public function register() {
34+
35+
$this->app->bind(ConfigurationInterface::class, function(){
36+
return new DotEnvConfiguration(base_path());
37+
});
38+
}
39+
}

0 commit comments

Comments
 (0)