You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
735 B

4 years ago
4 years ago
4 years ago
  1. <?php
  2. namespace App\Providers;
  3. use App\Channels\FcmChannel;
  4. use Illuminate\Notifications\ChannelManager;
  5. use Illuminate\Support\Facades\Notification;
  6. use Illuminate\Support\ServiceProvider;
  7. class AppServiceProvider extends ServiceProvider
  8. {
  9. /**
  10. * Register any application services.
  11. *
  12. * @return void
  13. */
  14. public function register()
  15. {
  16. Notification::resolved(function (ChannelManager $service) {
  17. $service->extend('fcm', function ($app) {
  18. return new FcmChannel(new HttpClient, config('fcm.key'));
  19. });
  20. });
  21. }
  22. /**
  23. * Bootstrap any application services.
  24. *
  25. * @return void
  26. */
  27. public function boot()
  28. {
  29. //
  30. }
  31. }