Open eiko03 opened 3 years ago
Just for reference, what class is your command extending? This sounds like the $laravel
property is not being set. Could you also confirm your framework version?
"laravel/framework": "^8.12", command is extending a custom class made only for this notify package @owenvoke
Does it extend Illuminate\Console\Command
in your custom class?
I'll see if I can replicate this later. 👍🏻
yes i am extending this class, still error
I was unable to replicate this issue with Laravel 8 and a default command that just contains:
class NotifyCommand extends Command
{
protected $signature = 'notify';
public function handle()
{
$this->notify('Hello Web Artisan', 'Love beautiful code? We do too!');
}
}
@nunomaduro, any ideas on this? 🤔
I ran into the same issue. The reason was I used it the __construct()
method of the command instead of handle()
. Move the notify()
call into your handle()
method and it should work.