mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-30 19:46:34 +00:00
145 - Resizing the Poster Image
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Intervention\Image\Facades\Image;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
@@ -21,6 +23,9 @@ class ProcessPosterImage implements ShouldQueue
|
||||
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
$imageContents = Storage::disk('public')->get($this->concert->poster_image_path);
|
||||
$image = Image::make($imageContents);
|
||||
$image->resize(600)->encode();
|
||||
Storage::disk('public')->put($this->concert->poster_image_path, (string) $image);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user