Laravel 5.6.19 Released
Published on by Paul Redmond
Laravel version 5.6.19 was released yesterday with support for multiple CC, BCC, and Reply-To recipients. Also, the Optional class now implements the __isset()
magic method.
The Optional class now implements the magic method __isset()
. In the issue, the PR references this example of why __isset()
is needed for optional:
$user = User::find(1);$hasPhoneNumber = !empty(optional($user->contacts->first())->cellphone);
Because Optional did not support __isset()
, the $hasPhoneNumber
variable in the example above will always be false
. The __isset()
method is triggered by calling isset()
or empty()
in inaccessible object properties.
Support for a custom SparkPost endpoint means that you can now configure the endpoint in the config/services.php
configuration file:
'sparkpost' => [ 'secret' => env('SPARKPOST_SECRET'), 'options' => [ 'endpoint' => env('SPARKPOST_ENDPOINT'); ]],
If the endpoint
option isn’t set or is null, the configuration uses the default endpoint (https://api.sparkpost.com/api/v1/transmissions
).
The last new feature is the ability to define multiple CC, BCC, and Reply-To recipients on mail notifications. These abilities were already possible on mailables, and are now possible on mail notifications.
Additionally, two new fixes ship as part of the 5.6.19 release. Here are the full release notes:
v5.6.19 (2018-04-30)
Added
- Added support for custom SparkPost endpoint (#23910)
- Added
Optional::__isset()
handling (#24042) - Added support for multiple cc, bcc and reply-to recipients on mail notifications (#23760)