I am working on simple qrcode laravel. I'm trying to store color in rgba format(ajax) in database for a specific id's qrcode's background color and calling it as a variable to change the qr-code's bgcolor. I cannot use hex format because simpleqrcode dependency only accepts rgba format.
So i have stored rgba in database and when i call it to the controller it show me error. A non well formed numeric value encountered. further I researched that when i call colors from database it come with quotations by default and i tried to replace it with str_replace but didn't work.
This is my code:
public function qrcode($id){
$article = Article::find($id);
$rgba = $article->bgcolor;
$html = str_replace('"', '', $rgba);
$image_path = \QrCode::format('png')
// ->merge('../storage/app/public/'.$article->image, .15, true)
->size(200)
->backgroundColor($html)
->errorCorrection('H')
->generate('127.0.0.1:8000/articles/'.$article->id , '../public/Qrcodes'.$article->image);
// dd($article->bgcolor);
// $image = '../public/'.$article->image;
return view('articles.modify_qrcode', compact('article'));
somebody told me to update composer. i have already updated it.

