laravel email markdown

laravel 郵件使用markdown

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

這個命令不只建立了email類文件 還生成了視圖文件 並把視圖也寫好了 return $this->markdown('emails.published'')
可根據須要修改 也可修改email markdown模版 php artisan vendor:publishphp

發送郵件laravel

Route::get("sendmail",function(){
    $email = new \App\Mail\LessionPublished(\App\User::first());
    Mail::to(\App|User::first())->send($email);
})
相關文章
相關標籤/搜索