faithgen /
events
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Innoflash\Events\Jobs\Saved; |
||
| 4 | |||
| 5 | use FaithGen\SDK\Traits\ProcessesImages; |
||
| 6 | use Illuminate\Bus\Queueable; |
||
| 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
| 8 | use Illuminate\Foundation\Bus\Dispatchable; |
||
| 9 | use Illuminate\Queue\InteractsWithQueue; |
||
| 10 | use Illuminate\Queue\SerializesModels; |
||
| 11 | use Innoflash\Events\Models\Event; |
||
| 12 | use Intervention\Image\ImageManager; |
||
| 13 | |||
| 14 | class ProcessImage implements ShouldQueue |
||
| 15 | { |
||
| 16 | use Dispatchable, |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 17 | InteractsWithQueue, |
||
| 18 | Queueable, |
||
| 19 | SerializesModels, |
||
| 20 | ProcessesImages; |
||
| 21 | |||
| 22 | public bool $deleteWhenMissingModels = true; |
||
| 23 | protected Event $event; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Create a new job instance. |
||
| 27 | * |
||
| 28 | * @param Event $event |
||
| 29 | */ |
||
| 30 | public function __construct(Event $event) |
||
| 31 | { |
||
| 32 | $this->event = $event; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Execute the job. |
||
| 37 | * |
||
| 38 | * @param ImageManager $imageManager |
||
| 39 | * |
||
| 40 | * @return void |
||
| 41 | */ |
||
| 42 | public function handle(ImageManager $imageManager) |
||
| 43 | { |
||
| 44 | $this->processImage($imageManager, $this->event); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |