Laravel change Connection for Notifications table

前端 未结 3 1744
鱼传尺愫
鱼传尺愫 2021-01-13 19:39

I am implementing Laravel 5.3 Notifications at the moment which is working very nice.

At the moment I am using \'email\' as a notifications channel but I want to add

3条回答
  •  无人共我
    2021-01-13 20:32

    It's pretty simple, Just add protected $connection = 'YOUR CONNECTION NAME'; at Illuminate\Notifications\DatabaseNotification

    That's all and it will work :)

    You don't need to create new models if you are going to use one notification table with same connection.

    My code will works if ur using different connection for USER model.

提交回复
热议问题