diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index c89b7e3..4378c68 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -47,7 +47,7 @@ class PublicController extends BaseController if(!array_key_exists($sizeName, $this->size)) { abort(400, "Size not exists"); } - $size = $this->size[$sizeName]; + $size = (int)$this->size[$sizeName]; $image = Image::query()->where("id", "=", $image_id)->firstOrFail(); $gallery = Gallery::query()->where("url", "=", $gallery_url)->firstOrFail(); @@ -70,7 +70,6 @@ class PublicController extends BaseController //Return from s3, takes a loooong time - var_dump((integer)$image->id);exit(); $resizeJob = new ResizeImage((integer)$image->id, $size); ResizeImage::dispatchSync($resizeJob); diff --git a/app/Jobs/ResizeImage.php b/app/Jobs/ResizeImage.php index 408a754..88e65f2 100644 --- a/app/Jobs/ResizeImage.php +++ b/app/Jobs/ResizeImage.php @@ -29,7 +29,7 @@ class ResizeImage implements ShouldQueue * * @return void */ - public function __construct(int $image_id, int $size) + public function __construct($image_id, $size) { $this->image_id = $image_id; $this->size = $size;