cid = $cid; } /** * Execute the job. * * @return void */ public function handle() { if ($this->cid) { $id = $this->cid; $code = QrCode::format('png')->size(600)->generate(config('app.code_url') . "?cid={$id}"); $file_path = "codes/{$id}.png"; Storage::disk(config('admin.upload.disk'))->put($file_path, $code); LibraryCategory::query()->where('id', $id)->update([ 'code_path' => $file_path ]); } } }