I want to print the mail content from db table in laravel view blade.I have the table mail_template. I want to fetch the field body from that table.
body field is a long text and value is in PHP content
body field value
<?php
if(($logged==Auth::User()->user_name && $finance_review!='')|| $status=='Rejected'){
?>
<span>Hello ,</span>
<p> has your Asset
request. Please login to <a href='asd.com'>http://systems.test.com</a>
→ “Asset” and see your status</p>
<?php }
else{ ?>
<span>Hello ,</span>
<p> has raised request.
Please login to <a href=''>test</a>
→ “Asset” and see your status</p>
<?php } ?>
I want to send the mail with filled content from fetched body field. I have tried as
$mail_content=mail_template::where('config_name','=','approve')->first()->body;
echo $mail_content;
It just prints the content as text. I want to fill the value in variable
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire