I am sending email to all members at once. Now i am trying to send emails to selected users. How can i do that?
This is my existing mailController
public function send_mail()
{
$joinus = new Joinus;
$mails = Joinus::all();
$array = array();
foreach ($mails as $mail)
{
array_push($array, $mail->email);
};
Mail::to($array)->send(new SendMail($joinus->email))->delay(60);
I am getting all users from Joinus model. Adding them to an array and sending emails to all arrays child. Am i need to add smt to SendMail? Or do i have to use jquery? If anyone give me code example i'll be gladful. This isn't to hard question. But i just didn't make it out.
Also this is the checkbox's place
@can('delete',app($dataType->model_name))
<td>
<input type="checkbox" name="row_id" id="checkbox_" value="">
</td>
@endcan
Aucun commentaire:
Enregistrer un commentaire