I have an input field in my app for external email and i want to send a Notification on that email.

The problem is that this email can be outside of my app so i can't use $user->notify().

Is there a way to send a notification using only email address??

推荐答案

With Laravel 5.5 and above you can send "On Demand Notifications" using the Notification facade:

Notification::route('mail', 'taylor@laravel.com')->notify(new InvoicePaid($invoice));

Topic on Official Docs

Laravel相关问答推荐

如何重置laravel ui密码

未将Laravel Blade属性传递给组件或类

找不到 Laravel 5 类日志(log)

Laravel & Docker:无法打开流或文件/var/www/html/storage/logs/laravel.log:无法打开流:权限被拒绝

Laravel 4:验证前修剪输入的最佳实践

使用 Laravel 限制多态多对多关系中的相关记录

Laravel 查询构建器 - 如何按别名分组,或进行原始 groupBy

在 Laravel Blade 中转义 vue.js 数据绑定语法?

致命错误:找不到类App\Http\Controllers\Redirect

在 Laravel 中无效后防止重定向到主页

如何在 Laravel 5.5 中为选定的请求类设置自定义响应

在 Laravel 4 迁移中创建 MYSQL 过程

Cookie::forget 不工作 laravel 5.1

在 Laravel 5 中找不到类App\Http\Controllers\Artisan

禁用Eager的关系

日期验证 - 如何本地化/翻译字符串今天和明天

调用未定义的方法 Illuminate\Routing\Route::get()

是否可以在 Laravel 的不同数据库中引用外键?

Laravel 更新查询

你如何在 Laravel 5.3 的新通知服务生成的Electron邮件中添加图像?