diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 4378c68..8538192 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -70,8 +70,7 @@ class PublicController extends BaseController //Return from s3, takes a loooong time - $resizeJob = new ResizeImage((integer)$image->id, $size); - ResizeImage::dispatchSync($resizeJob); + ResizeImage::dispatchSync($image->id, $size); $r = $this->tryReturnFromCache($cacheName."_".$size, $tenant->id, $gallery->id, $image->id); if($r != null) { diff --git a/app/Jobs/ResizeImage.php b/app/Jobs/ResizeImage.php index 88e65f2..408a754 100644 --- a/app/Jobs/ResizeImage.php +++ b/app/Jobs/ResizeImage.php @@ -29,7 +29,7 @@ class ResizeImage implements ShouldQueue * * @return void */ - public function __construct($image_id, $size) + public function __construct(int $image_id, int $size) { $this->image_id = $image_id; $this->size = $size;