【问题标题】:laravel markdown app urllaravel 降价应用网址
【发布时间】:2018-01-31 07:37:53
【问题描述】:

如何获取网站 url 而不是在 markdown 电子邮件中输入?

样本:

@component('mail::button', ['url' => 'htt://site.co', 'color' => 'green'])
Button
@endcomponent

我不想输入 http://site.co,而是像在刀片中那样输入 {{$url('/')}}

有可能吗?

【问题讨论】:

    标签: markdown laravel-mail


    【解决方案1】:

    试试 @component('mail::button', ['url' => '{{route('/')}}', 'color' => 'green'])

    它对我有用,我认为它也会帮助你

    【讨论】:

    • A non-numeric value encountered
    • @component('mail::button', ['url' => '{{config('app.url').route('route-name'}}', 'color' => 'green']) 试试这个
    • Try This in your Email Notification may be work public function toMail($notifiable) { return (new MailMessage) ->line('您收到这封电子邮件是因为我们收到了您帐户的密码重置请求.') ->action('管理员重置密码', url(config('app.url').route('admin.password.reset', $this->token, false))) ->line('如果您没有要求重置密码,无需进一步操作。'); }
    • 我没有使用通知,我正在使用事件和监听器。这就是Mail::to($event->order->user->email)->send(new \App\Mail\UserOrdered($event->order)); 的全部内容,其中的操作不起作用
    猜你喜欢
    • 2018-12-11
    • 2018-07-10
    • 2020-12-03
    • 1970-01-01
    • 1970-01-01
    • 2011-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多