Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mailuserlist=DB::table('table')
- ->join('some_table')
- ->select('some_thing')
- ->where('somecondition'))->get();
- Mail::queue('mail_template', $data, function($message) use ($mailuserlist)
- {
- $message->from('test@desto.co.in', 'Mail Notification');
- foreach ($mailuserlist as $value) {
- $message->to($value['email'],$value['firstname'].' '.$value['lastname']);
- }
- $message->subject('Testing mail');
- });
- $mailuserlist=DB::table('table')
- ->join('some_table')
- ->select('some_thing')
- ->where('somecondition'))->get();
- foreach ($mailuserlist as $mailuser) {
- Mail::queue('mail_template', $data, function($message) use ($mailuser) {
- $message
- ->from('test@desto.co.in', 'Mail Notification')
- ->to($mailuser['email'],
- $mailuser['firstname'].' '.$mailuser['lastname'])
- ->subject('Testing mail');
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement