我正在尝试使用来自非用户 Eloquent 模型的 Notifiable trait (notify()) 方法发送通知(电子邮件)
驱动模型
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class Driver extends Authenticatable
{
use Notifiable;
}
并发送我正在使用的通知
$driver->notify(new \App\Notifications\Driver\DriverAlloted($booking));
其中 $driver 是一个雄辩的模型实例(app\Driver.php),\App\Notifications\Driver\DriverAlloted 是通知;
如果我用它工作的任何用户 (App\User) 替换驱动程序,我怎样才能让它为 App\Driver 工作
慕勒3428872