laravel $data the result not show when using ckeditor

无人久伴 提交于 2020-07-10 08:39:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!