Skip to content

Commit ea8b9de

Browse files
ebisbepulkitjalan
authored andcommitted
share() method has depreciated in Laravel 5.4 (#24)
* deprecated function share() use singleton() instead
1 parent 33c25c1 commit ea8b9de

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
composer.lock
33
.DS_Store
44
/build
5+
.idea

src/GeoIPServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function register()
5151
*/
5252
protected function registerGeoIP()
5353
{
54-
$this->app['geoip'] = $this->app->share(function ($app) {
54+
$this->app->singleton('geoip', function() {
5555
return new GeoIP(config('geoip'));
5656
});
5757
}
@@ -63,7 +63,7 @@ protected function registerGeoIP()
6363
*/
6464
protected function registerUpdateCommand()
6565
{
66-
$this->app['command.geoip.update'] = $this->app->share(function ($app) {
66+
$this->app->singleton('geoip', function() {
6767
return new UpdateCommand(config('geoip'));
6868
});
6969

0 commit comments

Comments
 (0)