Skip to content

Commit 66b041d

Browse files
committed
Update service provider to work with Laravel 5.4
1 parent ebbf2cb commit 66b041d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Providers/SruServiceProvider.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
class SruServiceProvider extends ServiceProvider
99
{
10-
1110
/**
1211
* Bootstrap the application events.
1312
*
@@ -27,15 +26,13 @@ public function boot()
2726
*/
2827
public function register()
2928
{
30-
$app = $this->app;
3129
$this->mergeConfigFrom(
3230
__DIR__.'/../../config/config.php',
3331
'sru'
3432
);
35-
$app['sru-client'] = $app->share(function ($app) {
33+
$this->app->singleton(SruClient::class, function ($app) {
3634
return new SruClient($app['config']->get('sru.endpoint'), $app['config']->get('sru'));
3735
});
38-
$app->alias('sru-client', SruClient::class);
3936
}
4037

4138
/**
@@ -45,6 +42,6 @@ public function register()
4542
*/
4643
public function provides()
4744
{
48-
return array('sru-client');
45+
return [SruClient::class];
4946
}
5047
}

0 commit comments

Comments
 (0)