Laravel is fast becoming one of the most popular PHP frameworks and the long awaited 5.7 release has finally arrived.
Laravel 5.7 continues improvements for the previous version 5.6, and also includes some exciting new features.
In this blog post, we’ll be listing some of the great features that have us itching to test out.
Before we dive in, we’ll quickly note that Laravel has also revealed it will be rolling out any bug fixes until February 2019 and security fixes until August 2019.
The most awaited Laravel package which is a beautiful admin panel package for Laravel applications. It is a code-driven admin panel for new or existing Laravel projects.
The primary feature of Nova is the ability to administer your underlying database records using Eloquent. Additionally, Nova offers support for filters, lenses, actions, queued actions, metrics, authorization, custom tools, custom cards, custom fields, and more.
To know in depth about it follow the official documentation.
Laravel 5.7 introduces optional email verification to the authentication scaffolding included with the framework. To utilize this feature, you have to add the email_verified_at timestamp column to the user’s table migration that ships with the framework.
To advise newly joined users to verify their email, the User model should implement the MustVerifyEmail interface.
Guest User Gates / Policies
In previous versions of Laravel, authorization gates and policies automatically returned false for unauthenticated visitors to your application. However, with Laravel 5.7 it will now allow declare an “optional” type-hint or supplying a null default value to permit the guest user to pass through the authorization checks.
Laravel 5.7 allows you to send notifications in a locale other than the current language, and will even remember this locale if the notification is queued.
To accomplish this, the Illuminate\Notifications\Notification class now offers a locale method to set the desired language. The application will change into this locale when the notification is being formatted and then revert back to the previous locale when formatting is complete.
Laravel 5.7 allows you to easily “mock” user input for your console commands using the expectsQuestion method. In addition, you may specify the exit code and text that you expect to be output by the console command using the assertExitCode and expectsOutput methods.
You can now control the number of pagination links on each side of the paginated URLs design. By default, there will be three links created on each side of the paginator links. The newly introduced method onEachSide() allows to control them with Laravel 5.7.
Improved Error Messages
You can now better track your errors messages with your Laravel application. As of Laravel 5.7, you will get a cleaner concise message saying that the method doesn’t exist on the specific model.
You can read the official release documentation here.