How can I send email and SMS together using Laravel 5.5 ?
Should I use mailable and SMS service or Notification with SMS and How ?
How can I send email and SMS together using Laravel 5.5 ?
Should I use mailable and SMS service or Notification with SMS and How ?
You can create an event in laravel's App/Events folder. put all the code for send mail and sms with there configuration, just call that event wherever you want to hit sms or mail.
You may create one function which will include both notify() method for an email and dispatch() method for message
example
public function Notification(Model $tender)
{
$user = access()->user();
/* Send confirmation email */
$tender->notify(new Email($user));
/* Send confirmation message */
Send::dispatch($user);
}
Then you will just call a single function that is Notification() which will do both sending email and message