With Laravel 5.6, if you want pass multiple emails with names, you need to pass array of associative arrays. Example pushing multiple recipients into the $to
array:
$to[] = array('email' => $email, 'name' => $name);
Fixed two recipients:
$to = [['email' => '[email protected]', 'name' => 'User One'],
['email' => '[email protected]', 'name' => 'User Two']];
The 'name' key is not mandatory. You can set it to 'name' => NULL
or do not add to the associative array, then only 'email'
will be used.