robinhoo1973 /
laravel-translation-helper
| 1 | <?php |
||
| 2 | |||
| 3 | namespace TopviewDigital\TranslationHelper\Service; |
||
| 4 | |||
| 5 | use Illuminate\Bus\Queueable; |
||
| 6 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
| 7 | use Illuminate\Foundation\Bus\Dispatchable; |
||
| 8 | use Illuminate\Queue\InteractsWithQueue; |
||
| 9 | use Illuminate\Queue\SerializesModels; |
||
| 10 | |||
| 11 | class AsyncBroker implements ShouldQueue |
||
| 12 | { |
||
| 13 | use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 14 | |||
| 15 | protected $service; |
||
| 16 | |||
| 17 | public function __construct($service) |
||
| 18 | { |
||
| 19 | $this->service = $service; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function handle() |
||
| 23 | { |
||
| 24 | if (is_object($this->service) && method_exists($this->service, 'handle')) { |
||
| 25 | $this->service->handle(); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 |