nunomaduro / laravel-desktop-notifier

💻 Send notifications to your desktop from your Laravel Artisan Commands. An JoliNotif wrapper for Laravel.
http://nunomaduro.com
MIT License
454 stars 40 forks source link

Unable to read app property, I think the Command has change $app property to $laravel #8

Closed jvrsolis closed 6 years ago

jvrsolis commented 6 years ago

php artisan desktop:example

ErrorException : Undefined property: App\Console\Commands\DesktopNotification::$app

at /home/vagrant/code/wc2/vendor/nunomaduro/laravel-desktop-notifier/src/LaravelDesktopNotifierServiceProvider.php: 42 38| */ 39| Command::macro( 40| 'notify', 41| function (string $text, string $body, $icon = null) {

42| $notifier = $this->app[Contracts\Notifier::class]; 43| 44| $notification = $this->app[Contracts\Notification::class] 45| ->setTitle($text) 46| ->setBody($body);

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined property: App\Console\Commands\DesktopNotification::$app", "/home/vagrant/code/wc2/vendor/nunomaduro/laravel-desktop-notifier/src/LaravelDesktopNotifierServiceProvider.php", ["Hello Web Artisan", "Love beautiful code? We do too!"]) /home/vagrant/code/wc2/vendor/nunomaduro/laravel-desktop-notifier/src/LaravelDesktopNotifierServiceProvider.php : 42

2 App\Console\Commands\DesktopNotification::NunoMaduro\LaravelDesktopNotifier{closure}("Hello Web Artisan", "Love beautiful code? We do too!") /home/vagrant/code/wc2/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php : 106

nunomaduro commented 6 years ago

@Javier-Solis Problem should be fixed now on the version v2.0.3.

Please perform a composer update nunomaduro/laravel-desktop-notifier and tell me the results 👍

nunomaduro commented 6 years ago

This should be fixed.