Laravel 8 is about to release? So what are we going to have to add?

Tram Ho

According to https://laravel-news.com/laravel-8-release-date , laravel 8 will be released on September 8. The laravel development team will release a new version every 6 months with important changes. In this update, there will be a lot of changes and improvements

Job Batching

Now batching jobs are easier with Bus::batch() . You just need to pass all the jobs into Bus::batch() and see the magic

and this will be the results returned

You can find batch information using Bus::findBatch(batchId)

New model folder

Now in version 8, the default directory of the model will be app/Models , not created by default in the app

Laravel Jetstream

This is a new package of laravel 8 and it will give you a great start. It has many features such as: user management, 2-factor authentication, browser session management, api token management, … There are many more you can learn more here: https : //github.com/laravel/jetstream

Laravel factory

Now we can seed data from our model more easily with the new factory enhancement.

Migration Squashing

Now we have a new command php artisan schema:dump . Surely while building the project, the constant generation of migrations will cause that folder to have infinitely many files. And you can squash all the migrations into one sql file.

Upgrade rate limiting

Rate limiters are defined by RateLimiter . The for method accepts a name and the Closure returns the settings applied to the route

Time Testing Helpers

When testing, you can easily “time travel” with this new feature of Laravel

Dynamic Blade Components

If you have multiple components and you need to call a different component at a different time then this will be a useful feature for you.

Upgrading Maintenance Mode

In previous versions, while in maintenance mode, it was still possible to access the app by setting up a list of authorized IP addresses. In this update, that feature has been removed and secret is used instead

While in maintenance mode, you can include a bypass token:

And then you can access the app by

You can also include more options

This paragraph means:

  • Put the app in maintenance mode
  • Redirect all routes to /
  • Set the status code to 200
  • Set bypass token is 1630542a-246b-4b66-afa1-dd72a4c43515
  • Render errors 503

serve upgrade

In patch 8, laravel supported we restarted the app every time .env changed. This will save us from having to rerun php artisan serve every time we change .env .

Here I just mentioned some changes, there are still a few more changes, you can find and read more at the link below.

Source: https://laravel.com/docs/8.x/releases#laravel-8

Share the news now

Source : Viblo