Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class ProcessArticleCoverOperation extends Operation
- {
- public function handle(Request $request)
- {
- $photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);
- $this->run(new ValidateCoverPhotoDimensionsJob($photo));
- $variations = $this->run(new GeneratePhotoVariationsJob($photo));
- $uploads = $this->run(new UploadFilesToCdnJob($variations));
- $cover = $this->run(new MakeCoverFromVariationUploadsJob($uploads));
- $this->run(CleanFilesInDirectoryJob::class, [
- 'files' => $variations,
- 'directory' => $this->run(GetImagesStorageLocationJob::class),
- ]);
- return $cover;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement