-
I recently upgraded a project to php 8 and laravel 8.37 and noticed raw html in emails when they contain a table. The table becomes malformed. I tried the pointers about removing indents, upgrading to L9, but still no difference. Below are screenshots of the table. This is my layout.blade code:
This is the broken email blade code: `@component('mail::message') Hello {{ $user->name }},Please find below, a summary of the portfolio performance of {{ $plan->name }} plan for the month of {{ \Carbon\Carbon::now()->format('M, Y') }} Want more information? Chat with us in-app or send an email to .... <style> table { font-family: arial, sans-serif; font-size:11px; border-collapse: collapse; width: 100%; margin: 20px auto; table-layout: auto; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; } </style>
@if($stocks->isNotEmpty())
Stocks@foreach($stocks as $stock)
The SmartWealth Team What can I do to resolve this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
De-indenting every line of code in the email blade resolved this. |
Beta Was this translation helpful? Give feedback.
De-indenting every line of code in the email blade resolved this.