laravel email markdown

laravel 邮件使用markdown

php artisan make:mail lessonPublished --markdown="emails.published"    

这个命令不仅创建了email类文件 还生成了视图文件 并把视图也写好了 return $this->markdown('emails.published'')
可根据需要修改 也可修改email markdown模版 php artisan vendor:publish

发送邮件

Route::get("sendmail",function(){
    $email = new \App\Mail\LessionPublished(\App\User::first());
    Mail::to(\App|User::first())->send($email);
})
posted @ 2017-09-03 15:02  miyaye  阅读(336)  评论(0编辑  收藏  举报