Closed lutek closed 3 weeks ago
Just create a blade view something like this:-
<table>
@foreach($order->items as $item)
<tr>
<td>{{$item->name}}</td>
<td>{{$item->qty}}</td>
...
</tr>
@endforeach
</table>
Then in your order model
public function getItemsTableAttribute(): string
{
return view('components.order_table', ['order' => $this])->render();
}
So then in your email template you can use:-
##order.items_table##
I would like to see some example/hint with Order items in table row.