Laravel 5.3 Notification Vs Mailable

后端 未结 2 841
我在风中等你
我在风中等你 2021-02-02 06:17

I am a little confused about whether to use Laravel\'s Notification or Mailable class. From what I understand, Mailables are used to send only emails whereas Notifications can b

2条回答
  •  [愿得一人]
    2021-02-02 07:14

    Yes, definitively, if each email layout is different, you should use Mailable

    Mailable is the new way to send emails, easier than before. More customizable than Notifications.

    Notification is very nice if you want to send a predefined layout in differents channel ( Mail, SMS, Slack, etc )

    You can customize notifications layout, but having 1 layout by notification is going to get more difficult... it is just not the use case for notifications

提交回复
热议问题