Laravel 5.7.26 Released


February 13th, 2019


The Laravel team released Laravel 5.7.26 yesterday with a new pipeline method and a method to temporarily bypass model events.

First, a new Pipeline method thenReturn was added by Tim MacDonald to allow additional work do be done on the object passed through:

1// Previously
2$users = app(Pipeline::class)
3 ->send(User::query())
4 ->through($pipes)
5 ->then(function ($query) {
6 return $query
7 ->whereConfirmedEmail()
8 ->whereAccountActive()
9 ->get();
10 });
12// As of 5.7.26 you can use `thenReturn()`
13$users = app(Pipeline::class)
14 ->send(User::query())
15 ->through($pipes)
16 ->thenReturn()
17 ->whereConfirmedEmail()
18 ->whereAccountActive()
19 ->get();

Next, a few public getter methods were added:


License files were added to each Illuminate components since Laravel uses subtree splits for all the components:

Since we use a sub-split to split components into separate packages it’s wanted that we also provide a license file for each component.

A Model::withoutEvents() method was added to temporarily bypass model events. A common use-case for this is testing:

1$user = User::withoutEvents(function () {
2 return factory(User::class)->create();

You can see the full list of changes below, and the whole diff between 5.7.25 and 5.7.26 on GitHub. The full release notes for Laravel 5.7 are available in the GitHub 5.7 changelog:



  • Added Illuminate\Pipeline\Pipeline::thenReturn() (#27429)
  • Added Illuminate\Cache\TaggedCache::getTags() (#27445)
  • Added Illuminate\Http\ResponseTrait::getCallback() (#27464)
  • Added license file to each component (9e57e8b)
  • Added Model::withoutEvents() method (#27419, 5c5d6b2)


  • Revert of “Fixed wrong class being used when eager loading nullable MorphTo with withDefault() (#27411)”(9bbf644)


  • Improved error message in Illuminate\Foundation\Testing\TestResponse::assertJsonValidationErrors() (#27495, 98010da)
  • Illuminate\Support\Testing\Fakes\EventFake::dispatch() will return response (#27430)

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.

Laravel News Partners