lumen.ERROR:Symfony \ Component \ Debug \ Exception \ FatalThrowableError:致命错误:调用未定义的函数App \ Http \ Controllers \ dispatch()

I am working on Lumen for sending bulk mailing but I am getting an error like,

Stack trace:

[2018-07-27 04:57:14] lumen.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Call to undefined function App\Http\Controllers\dispatch() in /chroot/home/milopleo/milople.org/html/development/harsh/presvi/api/app/Http/Controllers/EmailController.php:15

And these are the steps which I followed, https://appdividend.com/2017/12/21/laravel-queues-tutorial-example-scratch/

you are using Lumen which does not have helper methods so you should

new PendingDispatch($job); //replace this with dispatch

Hope this helps.