diff --git a/CHANGELOG.md b/CHANGELOG.md index d1ac3b6..4cdd354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [1.3.2] - 2018-01-24 +## [2.0.0] - 2018-02-16 ### Added - Support to Laravel 5.6 +### Removed +- Trait `Notifications`. + ## [1.3.0] - 2017-08-30 ### Added - Bumps Laravel version diff --git a/src/LaravelDesktopNotifierServiceProvider.php b/src/LaravelDesktopNotifierServiceProvider.php index 546a418..2c64ca0 100644 --- a/src/LaravelDesktopNotifierServiceProvider.php +++ b/src/LaravelDesktopNotifierServiceProvider.php @@ -12,6 +12,7 @@ namespace NunoMaduro\LaravelDesktopNotifier; use Illuminate\Console\Command; +use Joli\JoliNotif\NotifierFactory; use Illuminate\Support\ServiceProvider; use Joli\JoliNotif\NotifierFactory; use NunoMaduro\LaravelDesktopNotifier\Contracts\Notification as NotificationContract; @@ -43,8 +44,11 @@ function (string $text, string $body, $icon = null) { $notification = $this->app[Contracts\Notification::class] ->setTitle($text) - ->setBody($body) - ->setIcon($icon); + ->setBody($body); + + if (! empty($icon)) { + $notification->setIcon($icon); + } $notifier->send($notification); }