I am struggling doing the exact same thing, the way common features are implemented differently in laravel and lumen totally sucks.
Sep 14, 2015
5
Level 5
dispatch queue outside controller
Hi,
I want to dispatch a queue from a class, is there a way to do this? In laravel 5 you can use:
<?php
namespace App;
use Illuminate\Foundation\Bus\DispatchesJobs;
class ExampleClass
{
use DispatchesJobs;
}
But in lumen that doesn't work...
Level 1
Ok I managed to make this work by copying the Illuminate\Foundation\Bus\DispatchesJobs file from laravel to lumen in a app\Traits folder and using it the same way as laravel :)
Cheers, Xavier
Please or to participate in this conversation.