1 | <?php |
||
13 | |||
14 | final class ProcessImages implements ShouldQueue |
||
15 | { |
||
16 | use Dispatchable, |
||
17 | InteractsWithQueue, |
||
18 | Queueable, |
||
19 | SerializesModels, |
||
20 | ProcessesImages; |
||
21 | |||
22 | public bool $deleteWhenMissingModels = true; |
||
|
|||
23 | |||
24 | /** |
||
25 | * The testimony to process images for. |
||
26 | * |
||
27 | * @var Testimony |
||
28 | */ |
||
29 | protected Testimony $testimony; |
||
30 | |||
31 | /** |
||
32 | * Create a new job instance. |
||
33 | * |
||
34 | * @param Testimony $testimony |
||
35 | */ |
||
36 | public function __construct(Testimony $testimony) |
||
37 | { |
||
38 | $this->testimony = $testimony; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Execute the job. |
||
43 | * |
||
44 | * @param ImageManager $imageManager |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function handle(ImageManager $imageManager) |
||
49 | { |
||
50 | $this->processImage($imageManager, $this->testimony); |
||
51 | } |
||
52 | } |
||
53 |