jeudi 13 septembre 2018

How to send mail multiple selected users

I have a meetings table where I am storing meeting information and where I can select a meeting between 2 types of user visitor type user and host type user. I have a many to many relationships between users and meeting that's why I have a pivot table meeting_user. I need to send mail all of the selected users for one meeting.

I am trying to send email using this but it's storing the meeting_id into notifiable_id column of db. so how can I store users_id in the notifiable_id column of db.

$meetings->save();

    $meetings->users()->attach($request->user_id);

    $users = Meeting::with('users')->get();
    (\Notification::send($users, new NewMeetingNotification(Meeting::latest('id')->first())));



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MrF1T1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire