In-Depth Laravel 8 New Released Features

Author image By Disha Aghera  |  Tuesday, May 18, 2021 02:01 PM  |  5 min read  |   181

Laravel 8

Laravel 8 is a newly released Laravel framework that launched on 8th September. Peers want to know what’s new in Laravel 8 and what improvement were made in Laravel 7. Before understanding the Laravel 8 features, one needs to see the Laravel 6 version. As Laravel 6 framework switches to semantic versioning, we need to understand its process.

Let’s drive in and take a look at the latest Laravel 8 new features

Laravel 8 New Features

Laravel 8 New Features

Laravel 8 is here! This release includes many new features that will improve your development experience. Here’s a quick overview of what’s new in this version.

1. Laravel Jetstream

One of the best new features in Laravel 8 is Laravel Jetstream. It provides a fantastic starting point for developing Laravel applications development. It uses built-in options like:

  •  Login and Registration
  •  Email Verification
  • Session Management
  • Two Factor Authentication
  • Tailwind CSS designed
  • Laravel Sanctum API Support

2. How are Laravel 8 features Jetstream used?

Developers can create a new application with Jetstream by using the Laravel installer. One needs to add the following code:
Laravel new your-project –jet

Now choose the stack (Livewire or Inertia). Later run your database migrations as PHP artisan migrate

Finally, check your app at localhost:8000 by running code: PHP artisan serve

That’s all it’s ready. Get set and explore your new Laravel Jetstream application. One can find the composer installation instructions that are available in the Laravel Jetstream documentation.

3. Migration Squashing

Wondering what the best new features in Laravel 8? Well, Laravel 8.0 introduced another existing new feature migration squashing. With this, we do not need to scroll for longer to open the migration folder. When comparing Laravel 8 vs Laravel 7 migration squashing is one best feature of Laravel 8. Using this, one can condense migration files into a single SQL file by using the below code:

PHP artisan schema: dump
PHP artisan schema: dump – prune

Laravel comes with a new schema file database/schema. One needs to use the migration squashing feature to run the schema. Using this feature, Laravel will run the SQL from the schema and then move on to create later in the migration folder.

4. Model Updates

The new features in Laravel 8, i.e. app/Models directory, are back. In the Laravel 5 version, a lot of developers observed that the Models directory was missing. With this new release Laravel feature, the app directory was introduced. Using this feature, one need not create a folder. One need not require a lot of developers. And need not make an extra nuisance. Laravel 8 comes with an app/models directory that can be restored quickly.

5. Model Factory Classes

Taylor Otwell rewrote the Eloquent model factories as classes. If we compare Laravel 8 vs Laravel 7, then we can better understand the model factor classes.

Laravel 7.x User Factory code:

Laravel 7.x User Factory code:

Laravel 8 User Factory code:

Laravel 8 User Factory code:

With the above code, we can say that Laravel 8 factory classes can extend the base Laravel factory class. Let’s take a look at how Laravel 7 vs Laravel 8 is different.

Use factories in Laravel 7

Use factories in Laravel 7

Use factories in Laravel 8

Use factories in Laravel 8

Use factories in Laravel 8.1

6. Job Batching

For Laravel, jobs are tasks that are performed as part of a queue to accomplish something. The Laravel 8 features use new batching functionality with defining jobs. Let’s say, for example, use a simplified batchable unit like the given below:

Job Batching

As soon as the batch job is set, you can dispatch a batch in your controller using the batch method of the bus façade.

bus façade

7. Get better Rate Limiting

Here’s the rate-limiting of Laravel 7

Here’s the rate-limiting of Laravel 7

Here’s the rate-limiting of Laravel 8

Here’s the rate-limiting of Laravel 7

Apply to pre-configured rate limiter along with route throttle.

Apply to pre-configured rate limiter along with route throttle.

8. Maintenance Mode

Taylor Otwell contributed to the maintenance mode. In the features of Laravel 8, PHP artisan down maintenance mode. It’s bypass using an allow list that accessed the application. The feature was removed to get a simpler solution. In maintenance mode, one uses the secret option to specify a maintenance mode:

PHP artisan down – – secret = “1630542a-246b-4b66-afa1-dd72a4c43515”

After maintenance mode is placed, one navigates the application URL matching. Laravel uses maintenance mode with bypass cookies to your browser. One can redirect the application route. As soon as a cookie is issued to your browser, one can browse the application normally.

9. Pre-Rendering Maintenance Mode

Utilize the PHP artisan down command during deployment. The user can encounter errors while composer dependencies and infrastructure components continue to update. With this Laravel framework, one can determine your application and render the maintenance mode using a template engine. To pre-render a template of your choice using the down command render option.
php artisan down – – render = “errors: : 503”

10. Closure Dispatch / Chain

Use the new catch method and provide a closure that execute if a queue closure fails to complete successfully after exhausting. Check the queue configured retry attempt:

use Throwable;
dispatch(function () use ($podcast) {
})->catch(function (Throwable $e) {
// This job has failed…

11. Dynamic Blade Components

Taylor contributed Dynamic Blade Components. There are times when we need to render components but don’t know which component to render until runtime. In this situation, one needs to use Laravel’s dynamic component to render based on a runtime value like:
<x-dynamic-component :component=”$componentName” class=”mt-4″ />

Wrapping up

We have checked new features in Laravel 8, where Taylor and the team work hard to add a feature that benefits developers. Talking about Laravel 8, it requires PHP 7.3 and more upgrades. As one of the best Laravel app development companies, we offer the best Laravel shift service or custom-based requirements. If you’re looking for innovative Laravel solutions, hire Laravel developers and grow your business with ease.

In-Depth Laravel 8 New Released Features

Contact Us



Author image

Disha Aghera

Disha Aghera is a Full Stack Tech Lead. I have developed web applications from scratch and also support existing applications. I have experience in Laravel, CodeIgniter, CakePHP, Zend Framework, Angular, Node JS, etc. I found more things to learn here

Why Our Client Love Us?

  • Fast kick-off
  • Agile Ready
  • 98% Client Retention
  • 360-Degree solutions

Our integrity and process focuses largely on providing every customer the best recommendations for their respective business. Our clients become recurring customers because we always go beyond their expectations to deliver the best solutions.

Get In Touch
Mr. Sieva Savko
Customer for over 4 years Mr. Sieva Savko Norway

Concetto Labs have provided us with a tremendous amount of help. Their competence in various IT fields led to a positive outcome while facing different challenges. A lot of value was given by their helpful professional staff. To describe this company in three words: effectiveness, collaboration, trust. I would also like to personally thank Mr. Tejas Patel for his positive, friendly, and highly competent approach. The all-around support provided by him made every task at hand a no-brainer.

Miss. Caroline Jack
Customer for over 4 years Miss. Caroline Jack South Africa

It has been an absolute pleasure working with the Concetto Labs team! We have worked together on a few projects now, all of which have been successful. You can rely on good communication and response times from these guys. And they go above and beyond to ensure that the result is achieved. Because of their great service, they have become an integral part of our business and we will continue to use them going forward.

Mr. Richard Bartlett
Customer for over 3 years Mr. Richard Bartlett United States

Concetto Labs is a group of incredibly talented individuals. They are very responsive and communicate with you each and every step of the process. I worked with Manish Patel throughout the entire process and must say that I have never conducted business with a more honest and professional individual. Together with his team, Manish created exactly how we envisioned it to be. Thanks for all of your hard work.

Mr. Conrad Abraham
Customer for over 2 years Mr. Conrad Abraham United States

Concetto Labs team is my go-to for any simple or complex development projects. They have risen to the challenge. Great project management, communication, and super quick turnaround. I’ve done multiple projects with them and don’t plan on changing that.

Mr. Edward Chin
Customer for over 4 years Mr. Edward Chin Canada

Concetto Labs was able to bring my complex idea to life. Throughout the project, Concetto Labs maintained constant communications and was always professional - considering I had no experience in what I wanted to create their welcoming attitude, patience, and knowledge in the field created the perfect environment to work in. I was so impressed with their work that I've kept them on board as my go-to experts. Thanks for the worthwhile experience and the breathtaking product.

Karuna Govind
Karuna Govind CTO & Co Founder (Coupay) London, UK

We started working with Concettolabs due to the influx of work on mobile (Flutter) and frontend (React.js). It's been fantastic working with them. Good, consistent communication and good quality of work means they may be our first choice for many projects to come.

Arunabha Choudhury
Arunabha Choudhury Director (Fuzzann Technologies Private Limited) India

We are a healthcare IT company and wanted to build a Mobile Application for both Android and IOS using Flutter. The Concetto Lab team has been very patient with our project requirements and made sure all our queries are answered. It was a great show of professionalism and customer relationship. Even during the project, the team was very accommodating of all the changes we requested. The project was delivered successfully and we deployed the app in the Android Play Store. Overall, the entire process has been very transparent and the team was able to deliver exactly what we had envisioned the project outcome to look like.

Good Firms Clutch App Futura Microsoft Associate Mobile App Top Developers Gesia
Are you enjoying reading what you see?

Feel like discussing more about this with our Sales Experts? Click on Create Similar Button.