String value showing with [" "] characters

Posted 4 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.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.