5.7.28

Latest release in branch 5.7
Released 7 years ago (February 05, 2019)

Software Laravel
Branch 5.7
Status
End of life
End of bug fixes March 04, 2019
End of security fixes September 04, 2019
First official release version 5.7.0
First official release date 7 years ago (September 04, 2018)
Supported
PHP versions
PHP ≥ 7.1.3
Release notes https://github.com/laravel/laravel/releases/tag/v5.7.28
Source code https://github.com/laravel/laravel/tree/v5.7.28
Documentation https://laravel.com/docs
Download https://laravel.com/docs/master/installation
Laravel 5.7 Releases View full list

What Is New in Laravel 5.7

Laravel 5.7 introduces a set of focused improvements to developer experience and application capabilities. The update brings a new email verification package, enhanced console testing, and several syntactic sugar additions.

Category Key Changes
New Features Email Verification, Laravel Nova, Symfony Dump Server, Notification Localization
Developer Experience Improved Console Testing, Paginator URL Defaults, UUID Methods
API Resources Conditional Relationships & Attributes

How does Laravel 5.7 improve email verification?

Laravel 5.7 includes a built-in solution for verifying user email addresses. This scaffolding provides the routes and controllers needed to send verification links and confirm user emails.

In practice, this saves significant development time. You can activate it by implementing the MustVerifyEmail interface on your User model. The framework handles the entire flow out of the box.

What developer console improvements were made?

Testing Artisan commands is now much simpler with the new artisan test method. This method allows you to call commands and make assertions on their output and exit code directly in your test suite.

$this->artisan('email:send')
     ->expectsQuestion('Which provider?', 'mailgun')
     ->assertExitCode(0);

This is a cleaner and more intuitive way to test interactive console commands compared to previous methods.

What new URL handling was added for pagination?

The paginator can now maintain the original query string parameters across all pagination links. You can set a default query string using the new withQueryString method.

Paginator::defaultView('pagination::view');
Paginator::defaultSimpleView('pagination::view');

This is useful for preserving filters and sort orders when users navigate through paginated results, improving the overall user experience.

How are UUIDs better supported?

New methods were added to the Str and Eloquent builder classes for working with UUIDs. You can now generate UUIDs and query models by them more easily.

use Illuminate\Support\Str;

$uuid = Str::orderedUuid();

The orderedUuid method generates a timestamp-first UUID that is efficient for database indexing. This matters for applications using UUIDs as primary keys for scalability.

What about API resource improvements?

API resources gained the ability to conditionally include relationships and attributes. You can now use the whenLoaded method to include relationships only if they have been eager loaded.

public function toArray($request)
{
    return [
        'name' => $this->name,
        'email' => $this->email,
        'posts' => PostResource::collection($this->whenLoaded('posts')),
    ];
}

This prevents unnecessary database queries and keeps your API responses lean and efficient.

FAQ

Is Laravel Nova included with the 5.7 update?
No, Laravel Nova is a separate, first-party admin panel package. While it was announced alongside the 5.7 release, it requires a separate license and installation via Composer.

How do I enable the new email verification feature?
Implement the Illuminate\Contracts\Auth\MustVerifyEmail contract on your User model. The necessary routes (EmailVerificationRequest, VerificationController) are already included in the framework.

What is the Symfony Var-Dump Server used for?
It collects and displays dump output from your application in the console instead of the browser. This is extremely useful for debugging API requests or commands where browser output isn't practical.

Can I localize notification emails in 5.7?
Yes. Notifications will now use the preferred locale of the notifiable entity. If your User model has a locale attribute, the notification will automatically be sent in that language.

Were there any changes to the minimum PHP version?
Yes. Laravel 5.7 requires PHP >= 7.1.3. This allows the framework to use newer PHP features and ensures better performance and security.

Releases In Branch 5.7

Version Release date
5.7.28 7 years ago
(February 05, 2019)
5.7.19 7 years ago
(December 15, 2018)
5.7.15 7 years ago
(November 22, 2018)
5.7.13 7 years ago
(November 07, 2018)
5.7.0 7 years ago
(September 04, 2018)