Skip to content

Commit

Permalink
Merge pull request #35 from P-Shakibafar/patch-1
Browse files Browse the repository at this point in the history
fix #34
  • Loading branch information
hosseinRezaei188 authored Mar 10, 2021
2 parents 81724de + 076f5e9 commit df4051b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ServiceProviderLaravel8.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace Kavenegar\Laravel;

use Kavenegar\KavenegarApi as KavenegarApi;
use Illuminate\Support\Facades\Notification;
use Kavenegar\Laravel\Channel\KavenegarChannel;

class ServiceProviderLaravel8 extends \Illuminate\Support\ServiceProvider
{
Expand All @@ -26,5 +28,10 @@ public function register()
$this->app->singleton('kavenegar', function ($app) {
return new KavenegarApi($app['config']->get('kavenegar.apikey'));
});
Notification::resolved( function ( $service ) {
$service->extend( 'kavenegar', function ( $app ) {
return new KavenegarChannel( $app->make( 'kavenegar' ) );
} );
} );
}
}

0 comments on commit df4051b

Please sign in to comment.