enter image description here I'm trying to decode qr code form local storage but get following error syntax error, unexpected 'readonly' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
namespace Crm\Http\Controllers;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Storage;
use Libern\QRCodeReader\QRCodeReader;
class ScanQrCodeController extends Controller
{
// public function __construct(string $imagePath)
// {
// $imagePath = $this->imgPath;
// }
public function scanQrCode()
{
$qrCodeScan = new QRCodeReader();
$data = Storage::exists('public/uploads/companies/1/1/AVL0CQ/testQR.png');
$url = Storage::url('public/uploads/companies/1/1/AVL0CQ/testQR.png');
$imgPath = (string) 'storage/uploads/companies/1/1/AVL0CQ/testQR.png';
$qrCodeData = $qrCodeScan->decode($imgPath);
return [
"qr file exists " => $data,
"url " => $url,
// "qr code output" => $qrCodeData
];
}
}
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/bG3DyNU
via IFTTT
Aucun commentaire:
Enregistrer un commentaire