Skip to content

Commit

Permalink
Replace deprecated share() method for Laravel 5.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklaw5 committed Feb 3, 2017
1 parent c6ca3f2 commit fb34931
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/LarapiServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

namespace Larapi;

Expand Down Expand Up @@ -30,9 +30,10 @@ public function boot()
*/
public function register()
{
$this->app['larapi'] = $this->app->share(function($app){
return new Larapi;
$this->app->bind('larapi', function ($app) {
return new Larapi;
});

$this->app->booting(function(){
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
$loader->alias('Larapi', 'Larapi\Facades\Larapi');
Expand All @@ -49,4 +50,4 @@ public function provides()
return array('larapi');
}

}
}

0 comments on commit fb34931

Please sign in to comment.