greeniron
greeniron

Reputation: 131

How to display multibyte character flash message in Laravel7

I'm studing contact form with flash message. Laravel Framework version is 7.15.0

I can display flash message using below Contoller code.

\Mail::send('mail', array(
            'name' => $request->get('name'),
            'email' => $request->get('email'),
            'phone' => $request->get('phone'),
            'subject' => $request->get('subject'),
            'user_query' => $request->get('message'),
        ), function($message) use ($request){
            $message->from($request->email);
            $message->to('[email protected]', 'Admin')->subject($request->get('subject'));
        });

        return back()->with('success', 'We have received your message and would like to thank you for writing to us.');
    }

I would like to change the flash message as Japanese like below code.

 return back()->with('送信完了', 'ありがとうございました');

however I couldn't get flash message.

I tried as dobule quote version below but it won't show message.

 return back()->with("送信完了", "ありがとうございました");

Could you teach me what is wrong my code please?

Upvotes: 0

Views: 29

Answers (1)

HunterX1
HunterX1

Reputation: 81

try this code

return back()->with('success', 'ありがとうございました');

Upvotes: 1

Related Questions