Outsource Laravel Development Partner - $3200/Month | Bacancy

Laravel 7.8 Released

Published on by

Laravel 7.8 Released image

Never Miss a Laravel Release 🚀

Sign up and get an email with each new Laravel release

The Laravel team released v7.8.0 with new takeWhile and takeUntil collection methods, along with all the latest new features, fixes, and changes in the 7.x branch. Let’s look at a few new features released in 7.8:

Redirector Signed Routes

Ryan Chandler contributed shortcut methods for generating signed routes from the Redirector service:

// Example
redirect()->to(URL::signedRoute(...));
 
// Using `signedRoute` and `temporarySignedRoute`
redirect()->signedRoute($route, $parameters, $expiration, $status, $headers);
 
// and
 
redirect()->temporarySignedRoute($route, $expiration, $parameters, $status, $headers);

Use-cases for these new methods are relatively edge-case, and I would advise reading the discussion in the Pull Request before reaching for these methods.

The takeUntil and takeWhile Collection Methods

Joseph Silber contributed a takeUntil and takeWhile collection methods, also making them support lazy collections. The documentation has updated details about these two methods.

First, here’s some examples of using the takeUntil method (until is an alias of takeUntil with this release):

$collection = collect([1, 2, 3, 4]);
 
$subset = $collection->takeUntil(function ($item) {
return $item >= 3;
});
 
$subset->all();
// [1, 2]
 
// Passing a primitive value
$subset = $collection->until(3);
$subset->all();
// [1, 2]

Next, here’s an example of takeWhile:

$collection = collect([1, 2, 3, 4]);
 
$subset = $collection->takeWhile(function ($item) {
return $item < 3;
});
 
$subset->all();
// [1, 2]

Check out Pull request #32496 and #32494 for implementation details, and the updated collection documentation for usage examples.

Release Notes

While we didn’t look at all the new features in this post, you can see the full list of new features and updates below and the diff between 7.7.0 and 7.8.0 on GitHub. The full release notes for Laravel 7.x are available in the latest v7 changelog:

v7.8.0

Added

  • Added signedRoute() and temporarySignedRoute() methods to Illuminate\Routing\Redirector (#32489)
  • Added takeUntil and takeWhile collection methods (#32494, #32496)
  • Added Illuminate\Container\ContextualBindingBuilder::giveTagged() (#32514)
  • Added methods withFragment and withoutFragment to Illuminate\Http\RedirectResponse (11d6bef, 0099591, 42c67a1, a1e741a)
  • Added exclude_without validation rule (4083ae5)

Fixed

  • Fixed compiled route actions without a namespace (#32512)
  • Reset select bindings when setting select (#32531)

Changed

  • Added warn in Illuminate/Support/Facades/Auth::routes() when laravel/ui is not installed (#32482)
  • Added auth to each master on Illuminate\Redis\Connections\PhpRedisConnection::flushdb() (837921b)
  • Register opis key so it is not tied to a deferred service provider (Illuminate/Encryption/EncryptionServiceProvider.php) (62d8a07)
  • Pass status code to schedule finish (#32516)
  • Check route:list –columns option case insensitively (#32521)

Deprecated

  • Deprecate Illuminate\Support\Traits\EnumeratesValues::until (#32517)
Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
"The Vibes" — NativePHP Hosts a Day 3 after Laracon US image

"The Vibes" — NativePHP Hosts a Day 3 after Laracon US

Read article
What We Know About Laravel 13 image

What We Know About Laravel 13

Read article
New Colors Added in Tailwind CSS v4.2 image

New Colors Added in Tailwind CSS v4.2

Read article
Factory makeMany() Method in Laravel 12.52.0 image

Factory makeMany() Method in Laravel 12.52.0

Read article
Laravel Adds an Official Svelte + Inertia Starter Kit image

Laravel Adds an Official Svelte + Inertia Starter Kit

Read article
MongoDB Vector Search in Laravel: Finding the Unqueryable image

MongoDB Vector Search in Laravel: Finding the Unqueryable

Read article