doushi5117 2018-04-13 12:30
浏览 111
已采纳

使用markdown的Laravel Mail嵌套组件未正确解析

When I'm using ->markdown() method for send markdown mail in Laravel and using example used in Laravel Doc, I see that instead of a button in my E-Mail I see the plain HTML code.

my template :

@component('mail::message')
    # Order Shipped

    Your order has been shipped!

    @component('mail::button', ['url' => $url])
        View Order
    @endcomponent

    Thanks,<br>
    {{ config('app.name') }}
@endcomponent
  • 写回答

1条回答 默认 最新

  • dqjo4340 2018-04-13 14:05
    关注

    Ok I got my problem in git issus and Laravel Doc :

    Do not use excess indentation when writing Markdown emails. Markdown parsers will render indented content as code blocks.

    But phpstorm reformat my code that cause markdow render my inner components as code snippet.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?