What's new in Laravel 6

Laravel 6: All new features at a glance

Laravel 6 has been available since September 3rd: Release on Github. The documentation is already online: https://laravel.com/docs/6.0. It is an LTS version, i.e. a version that has been supported for a long time. In the course of this, Laravel already got a new website and a new logo: https://laravel.com/.

The main reason for the change to version 6 is to change the version system to Semver. At Semver, the version numbers are composed as follows:

  • MAJOR: This number changes if there are incompatible changes to the API
  • MINOR: This number changes when features that are compatible with older versions
  • PATCH: This number will be changed when there are bug fixes and security updates.

In this case 6.0.0 would be the first version, 6.0.1 the first bug fix, 6.1.0 the first function update and 7.0.0 incompatible changes.

Job middleware

Another innovation from Laravel 6 is that middleware can be used for jobs. This means that you can still do certain things before or after a job (e.g. clearing the cache)

In the job it looks like this:

public function middleware () {return [new SomeMiddleware]; }

And the middleware itself:

class SomeMiddleware {public function handle ($ command, $ next) {// Do something ... return $ next ($ command); }}

You can also include the middleware when calling:

SomeJob :: dispatch () -> through ([new SomeMiddleware]);

There is more on Github.

Further adjustments

With LazyConnections A new type of collection has now been added, which can process large amounts of data more efficiently.

There were also some improvements in the interaction of Eloquent with subqueries.

As of Laravel 6, the user interface (Bootstrap + Vue.js) is no longer supplied by default. However, it can be installed via composer:

composer require laravel / ui php artisan ui vue --auth

Looking for a Laravel developer?

We already have a lot of experience in dealing with Laravel and Vue.js.
Feel free to contact us without obligation.

to offer

about us