Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2.  
  3. class ProcessArticleCoverOperation extends Operation
  4. {
  5. public function handle(Request $request)
  6. {
  7. $photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);
  8. $this->run(new ValidateCoverPhotoDimensionsJob($photo));
  9. $variations = $this->run(new GeneratePhotoVariationsJob($photo));
  10. $uploads = $this->run(new UploadFilesToCdnJob($variations));
  11. $cover = $this->run(new MakeCoverFromVariationUploadsJob($uploads));
  12. $this->run(CleanFilesInDirectoryJob::class, [
  13. 'files' => $variations,
  14. 'directory' => $this->run(GetImagesStorageLocationJob::class),
  15. ]);
  16.  
  17. return $cover;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement