问题
i have a page for maintenable email template. i used ck editor to add the text. and i have a data to read
so in ckeditor i will write like
Dear Valued Customer,
Your application has been route approved Details :
Name: {{$data->name}},
phone: {{$data->phone}},
and this will save to column text_email
and i declare $data
in controller
but when i send the email, the ouput will show {{$data->name}}
not the value of $data->name
;
public function send_email($id){
$data=Data::where('id',$id)->first();
$template_email = PrMaintenableEmail::where('email_for', 'ME05')->limit('1')->first();
Mail::send('mail.mail', compact('temp_email','data'), function ($message) use ($template_email ) {
$message->from(xx, xx);
$message->subject($template_email ->subject);
$message->to('xxx', 'xxx');
});
}
in mail blade
{!! $template_email->text_email!!}
so, i have {{$data}} inside $template->text_email, how to show the value $data?
来源:https://stackoverflow.com/questions/62556510/laravel-data-the-result-not-show-when-using-ckeditor