douhan9467 2018-06-01 09:58
浏览 154
已采纳

Laravel方法Illuminate \ Mail \ Mailer :: test不存在

In my laravel project i use mailgun and guzzlehttp/guzzle. My route code is

 Route::get('/', function () {
    $data = [
      'title'=>'Hellow Avijit',
      'content'=>'This is a testing of mailing in Laravel using mailgun'
    ];

    Mail::test('emails.test', $data, function($message) {
        $message->to('019129avijit@gmail.com', 'Avijit Biswas')
            ->subject('This is Subject');
    });
});

I use

use Illuminate\Support\Facades\Mail;

But after running the project it is seen

Method Illuminate\Mail\Mailer::test does not exist.

I have tried a lot to solve this but i didn't get any solution. What can i do?

  • 写回答

1条回答 默认 最新

  • dongzhenbi8919 2018-06-01 10:23
    关注

    Use Mail::send() instead of Mail::test()

    Because send() is the inbuilt function in Mail.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器