Skip to content

Commit

Permalink
Hotfix for DI
Browse files Browse the repository at this point in the history
  • Loading branch information
axotion committed Nov 20, 2017
1 parent 5ff80e6 commit 67d8437
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Liteweb\LaravelDotpay;

use Liteweb\Dotpay\DotpayApi;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
const CONFIG_PATH = __DIR__ . '/../config/laravel-dotpay.php';
Expand All @@ -20,5 +22,8 @@ public function register()
self::CONFIG_PATH,
'laravel-dotpay'
);
$this->app->singleton(DotpayApi::class, function ($app) {
return new DotpayApi($app['config']['laravel-dotpay']['api']);
});
}
}

0 comments on commit 67d8437

Please sign in to comment.