media = $media; } /** * Execute the job. * * @return void */ public function handle() { $media = $this->media; $path = storage_path('app/'.$media->media_path); if (!is_file($path)) { return; } try { $img = new Image(); $img->resizeThumbnail($media); } catch (Exception $e) { } $media->processed_at = Carbon::now(); $media->save(); ImageUpdate::dispatch($media); } }