Laravel 5.8.8 Released

Laravel 5.8.8 Released

The Laravel team released Laravel 5.8.8 yesterday with a new query builder method along with the latest fixes and changes in the 5.8 branch.

First, a new Builder::forPageBeforeId() method was added to compliment an existing forPageAfterId(). These methods are useful to query for records before or after a given record. In the pull request author Tim MacDonald illustrates the following example to get the records around a “focused” post:

$posts = new Collection;

$posts = $posts->concat(ChatPost::forPageBeforeId(15, $focused->id)->get()->reverse());

$posts = $posts->push($focused);

$posts = $posts->concat(ChatPost::forPageAfterId(15, $focused->id)->get());

You can see the full list of fixes below, and the whole diff between 5.8.7 and 5.8.8 on GitHub. The full release notes for Laravel 5.8 are available in the GitHub 5.8 changelog:

v5.8.8

Added

  • Added Illuminate\Database\Query\Builder::forPageBeforeId() method (#28011)

Fixed

  • Fixed BelongsToMany::detach() with custom pivot class (#27997)
  • Fixed incorrect event namespace in generated listener by event:generate command (#28007)
  • Fixed unique validation without ignored column (#27987)

Changed

  • Added parameters argument to resolve helper (#28020)
  • Don’t add the path only if path is empty in compiled view (#27976)

Refactoring

  • Refactoring of env() helper (#27965)


Filed in: News


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Full-Stack Developer
Tampa, FL / Remote
Nu Image Medical
PHP Developer
Remote
X-Team
Full-Stack Developer
Sioux Falls, SD or Remote
Electric Pulp
Senior PHP / Vue.js Developer
Portland, OR / Remote
Bright Oak
Full Stack Vue.js Developer (Front-end focus)
Remote
LenderHomePage.com
Senior Laravel Web Application Developer
NYC or Remote
Happy Cog
Laravel Developer (Vue, SQL Server)
Geneva, Switzerland / Remote
World Trade Organization