String value showing with [" "] characters

Posted 8 months ago by Gabotronix

So I just noticed this bug, when building the subject for my mailable the string is showing like this :

Nuevo reporte de bug en ["Nombre del Restaurante"]

Any idea why is it showing the [""] characters around the concatenated variable??

This is the method controller where I build the string:

public function contactar_reportar_bug(BugReport $request)
    {
        
        $restaurant = Globals::where('name' , 'Nombre del restaurante')->pluck('value');
        
        $subject = 'Nuevo reporte de bug en '.$restaurant;
        
        
        
        Mail::to($destination_mail)->send(new BugReportMail($body, $uploadFile, $filename, $mimetype, $subject, $restaurant, $client_phone, $sender_mail));
        
        return response()->json([
        
            'success' => 'Reporte de bug enviado',
            'bug' => $bug,

        ]);
    }

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.