How to fetch data in mail template from database.

Posted 4 months ago by AKmahato

I created one mail template which is in HTML by using sendgrid templates but the problem is when I trying to fetch data from the database it is not coming into the template. I've no idea what i have to do. Please help

Here is my code


 <table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;background-color:#ffffff;padding:15px 0px 10px 5px">
      <tr>
        
        <th>User Id</th>
        <th>User Name</th>
        <th>Email</th>
        
      </tr>
      <tr style="text-align: left;">
        @foreach($count as $item)
            <td>{{$item->id}}</td>
            <td>{{$item->name}}</td>
            <td>{{$item->email}}</td>
       @endforeach
        
      </tr>
      
    </table>
   

Please sign in or create an account to participate in this conversation.