qrcodeService = $qrcodeService; } /** * Show a QR code image * * @param App\TwoFAccount $twofaccount * @return \Illuminate\Http\Response */ public function show(TwoFAccount $twofaccount) { return response()->json(['qrcode' => $this->qrcodeService->encode($twofaccount->uri)], 200); } /** * Decode an uploaded QR Code image * * @param \App\Http\Requests\QrCodeDecodeRequest $request * @return \Illuminate\Http\Response */ public function decode(QrCodeDecodeRequest $request) { $file = $request->file('qrcode'); return response()->json(['data' => $this->qrcodeService->decode($file)], 200); } }