This commit is contained in:
root 2019-12-30 22:52:02 +08:00
parent 928e59a977
commit 4992ea635c
2 changed files with 101 additions and 3 deletions

View File

@ -11,11 +11,11 @@ use App\Jobs\SendEmail;
class MailController extends Controller
{
public function send (MailSend $request) {
if ($request->input('type') == 2 && $request->input('recevicer')) {
if ($request->input('type') == 2 && $request->input('receiver')) {
abort(500, '收件人不能为空');
}
if ($request->input('recevicer')) {
if ($request->input('receiver')) {
$users = User::whereIn('id', $recevicer)->get();
} else {
$users = User::all();
@ -25,7 +25,7 @@ class MailController extends Controller
SendEmail::dispatch([
'email' => $user->email,
'subject' => $request->input('subject'),
'template_name' => 'mail.sendCustom',
'template_name' => 'mail.sendEmailCustom',
'template_value' => [
'name' => config('v2board.app_name', 'V2Board'),
'url' => config('v2board.app_url'),

File diff suppressed because one or more lines are too long