What is the specialty of the Laravel 6?


At last Laravel 6 has been released on the 3rd of September 2019. It is the major update after the release of Laravel version 5.8.

Today we will discuss the changes brought by Laravel from the viewpoints of Laravel developers.

Low memory usage

Laravel developers are habituated to use the collection method, which allowed them to work with very large datasets, which involve huge memory usage.

The Lazy collection has been implemented in Laravel 6 to keep the memory usage low because the Lazy collection feature works on the required portion of a particular file.

We have used Lazy collection method to keep only a small part of the memory in use in the following programming structure:-

use App\LogEntry;
use Illuminate\Support\LazyCollection;

LazyCollection::make(function () {
    $handle = fopen('log.txt', 'r');

    while (($line = fgets($handle)) !== false) {
        yield $line;
->map(function ($lines) {
    return LogEntry::fromLines($lines);
->each(function (LogEntry $logEntry) {
    // Process the log entry...

Improvement of database subquery support

In Laravel 6 we can call all attributes of a database by a single query and by a subquery under a particular query. We will help you to work with two related tables by running a query within a query.

We have used the following subquery to create interaction between the destination table and the flight table on the basis of the location of the last flight.

return Destination::addSelect(['last_flight' => Flight::select('name')
    ->whereColumn('destination_id', 'destinations.id')
    ->orderBy('arrived_at', 'desc')

Changes in composer package

A starter template for the application as a whole used to be installed in the earlier versions by default but you have to select from React, Vue and Bootstrap module.



India Flag Image India Office

Sidco Global Tower, UNIT 1602, CN Block,
Salt Lake, Sec-V, Kolkata- 700091

+91 033 4601 4300, +91 98745 97555


US Flag Image US Office

539 W. Commerce St #1602 Dallas, TX 75208

+1 (443) 671-7100