I'm new on Lumen and currently learning on using Lumen 5.8. Recently, my app that I'm developing requires implementing ShouldQueue or the queue() method when sending an email for various purpose. So I followed the instructions on the official page of setting up Mail on the Lumen 5.8 and I also saw the Illuminate\Contracts\Mail\MailQueue::class alias being setup on app.php. Unfortunately, sending email without queueing was fine except for sending when implementing the queue method and / or ShouldQueue. Are they another instruction on how to make queueing mail possible on the Lumen 5.8? Below is the error produced when trying to push the mail into the queue.

Argument 1 passed to Illuminate\Mail\Mailable::queue() must be an instance of Illuminate\Contracts\Queue\Factory, null given

Thanks really much !!

1 Answers

0
Ace On

Maybe I'm too late but here's the solution. Add $app->make('queue'); after $app->withEloquent(); in config/app.php