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

Laravel Developer
San Jose, CA - Must Be Local
X3 Builders
Experienced PHP Developer
Wilmington, NC
Queensboro Shirt Company
Senior Laravel developer
Netherlands, Rotterdam
Pionect
Senior Laravel Engineer
Remote okay (must already live in USA)
Hawthorne Effect
Senior Software Engineer (Remote - Contract)
Remote
Koodi Systems
PHP Developer
Pittsburgh / Remote
Sequoia Waste Solutions
Software Developer
Eindhoven
Simac IDS