Laravel电子邮件Markdown格式化问题

问题描述 投票:0回答:1

第一次在Markdown项目中使用Laravel并且它没有按预期渲染。

这是我的Markdown

@component('mail::message')

    ![{{ config('app.name') }}][logo]
    [logo]: {{ asset(config('app.vars.logo_small')) }}

    Subscription payment failure!

    @component('mail::table')
    |                  |                                                                            |
    | ---------------- | -------------------------------------------------------------------------- |
    | Charge:          | {{ $payment->stripe_currency }} {{ $payment->charge_fmt }}                 |
    | Card:            | {{ $payment->stripe_card_brand }}                                          |
    | Last 4:          | {{ '∎∎∎∎ ∎∎∎∎ ∎∎∎∎ ' . $payment->stripe_card_last4 }}                     |
    | Expiry:          | {{ $payment->stripe_card_exp_month }}/{{ $payment->stripe_card_exp_year }} |
    | Description:     | {{ $payment->stripe_description }}                                         |
    @endcomponent


    We tried to bill your subscription but were unable due to unavailable funds.
@endcomponent

但它呈现如下:

LOGOIMG

Subscription payment failure!

<div class="table">
Charge:         usd $10.42
Card:           mastercard
Last 4:         ∎∎∎∎ ∎∎∎∎ ∎∎∎∎ 4444
Expiry:         4/2044
Description:    App Data plan - Regular - 28/04/2019-28/05/2019
We tried to bill your subscription but were unable due to unavailable funds.

为什么<table> HTML标签显示。谢谢。

markdown laravel-5.8
1个回答
0
投票

我找到了答案here。基本上PHP Storm在copy n paste上格式化它,因为它是Markdown,所以正在解释空格。

© www.soinside.com 2019 - 2024. All rights reserved.