File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 7
7
8
8
class SruServiceProvider extends ServiceProvider
9
9
{
10
-
11
10
/**
12
11
* Bootstrap the application events.
13
12
*
@@ -27,15 +26,13 @@ public function boot()
27
26
*/
28
27
public function register ()
29
28
{
30
- $ app = $ this ->app ;
31
29
$ this ->mergeConfigFrom (
32
30
__DIR__ .'/../../config/config.php ' ,
33
31
'sru '
34
32
);
35
- $ app [ ' sru-client ' ] = $ app ->share ( function ($ app ) {
33
+ $ this -> app ->singleton (SruClient::class, function ($ app ) {
36
34
return new SruClient ($ app ['config ' ]->get ('sru.endpoint ' ), $ app ['config ' ]->get ('sru ' ));
37
35
});
38
- $ app ->alias ('sru-client ' , SruClient::class);
39
36
}
40
37
41
38
/**
@@ -45,6 +42,6 @@ public function register()
45
42
*/
46
43
public function provides ()
47
44
{
48
- return array ( ' sru-client ' ) ;
45
+ return [SruClient::class] ;
49
46
}
50
47
}
You can’t perform that action at this time.
0 commit comments