My Blog Posts

Laravel 8 Released with New Features

Laravel 8 Released with New Features


Laravel 8 has been released and includes many new features, including Laravel Jetstream, a model directory, model migration classes, transition crushing, speed limiter improvements, time test aids, dynamic blade components and many more.

Before moving on to new features, starting with version 6, I would like to point out that Laravel will now release a new major version every six months.

Laravel Jetstream

Laravel Jetstream develops the existing Laravel UI pier found in previous versions. Provides a starting point for new projects, including sign-in, registration, email verification, two-factor authentication, session management, API support through Laravel, and team management.

Model Directory

The application skeleton of Laravel 8 is a app/Modelsindex . All generator commands, models app/Models; but if this directory does not exist, the framework is the application's models app/folder will assume that it holds in .

Model Factory Classes

The Eloquent model factory is now class-based starting with Laravel 8 and with improved support for relationships between the factory (that is, a user has many tasks). The new syntax has entered a very nice format to create recordings through the new and improved model factory.

Migration Squashing

If your application contains a large number of migrate files, you can now compress them in a single SQL file. This file is run by the remaining migrate files that are not part of the compressed schema file when the migrate process is run first. Crushing the existing migrate and reducing the bloating of the migrate file and possibly improve performance when running tests.

Improved Speed Limitation

Laravel 8 provides improvements to existing speed limitation functionality, while supporting backward compatibility with its existing software and offering much more flexibility. It has the Speed limiter concept that you can define through Laravel 8:

As you can see, for()the method takes the HTTP request instance and gives you full control over dynamically limiting requests.

Time Test Aids

Laravel users have full control over the change of time through the excellent Carbon PHP library. Laravel 8 takes it one step further by providing appropriate test aids to change time in tests:

When using these methods, the time will be reset between each test.

Dynamic Blade Component

Sometimes you need to dynamically create a blade component at run time. Laravel 8 allows you to create the component :

Learn more about Laravel v8...

These are just a few of the new features in Laravel 8, and check out the Laravel 8 release notes and upgrade guide to see a full list.



Share this article


Comments (0)

Comment