Laravel 5.6.6 is now available for general release, including two new collection methods
sortKeysDesc, some changes that improve upon existing functionality, and the latest fixes.
The two new convenience collection methods allow you to sort object keys and sort them in descending order.
The PR adding these key sorting methods provides the following usage example:
Instead of having to do something like the following to sort keys:
$leadData = get_object_vars($this->getLeadViaAPI($id));ksort($leadData);$this->renderLead(collect($leadData));
Next up, is a change to the
optional() helper, which now returns
null if an object property is undefined as you might expect:
$data = (object) ['foo' => 'bar'];optional($data)->foobar // null
A performance change was made to cache wildcard listeners, which can potentially have a performance improvement for high-volume and data-heavy APIs.
Another change was updating the database schema for
nullableMorphs() to use
unsignedBigInteger instead of
Here are the full release notes from the Laravel 5.6 GitHub changelog:
optional()helper if object property is undefined (#23267)
- Cache event wildcard listeners (#23299, 82099cb)
Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.