Hello,
I got fatal error: Call to a member function push() when run:
Mail::queue('email.blank', ['html' => $html], function($msg) {
$msg->to(['email@gmail.com']);
$msg->from(['email@gmail.com']);
$msg->subject('Lumen Service Mail');
});
Its work if change file: Illuminate\Mail\Mailer.php
Add
use \Illuminate\Support\Facades\Queue as Queue;
And change line 205:
from: return $this->queue->push('mailer@handleQueuedMessage', compact('view', 'data', 'callback'), $queue);
to return Queue::push('mailer@handleQueuedMessage', compact('view', 'data', 'callback'), $queue);
this work for me!!
I opened a issue in github, but I was informed that this is a problem in using the tool, and is not a bug.
This is the issue link: https://github.com/laravel/framework/issues/10083#event-395963283
Any sugestion for handle this without change the mailer class?