Laravel 7.4.0 Out

Proxy for Collections

Loris Leiva, Collection::when()the method contributed to the ability to use a higher proxy:

// With this PR, this:
$collection->when($condition, function ($collection) use ($item) {
// ... can be refactored as this:

This PR allows you to chain other high-level proxy methods:

// This:
$collection->when($condition, function ($collection) {
// ... can be refactored as this:

Artisan expectsChoice() Assertion

Adrian Nuremberger contributed a command-testing method to question the elections.

Given the following example:

$name = $this->choice ('What is your name?', ['Taylor', 'Dayle'], $defaultIndex);

You can only get the answer to this query; you cannot test the options provided.

->expectsQuestion('What is your name?', 'Taylor')

With Laravel 7.4, you can:

->expectsChoice('What is your name?', 'Taylor', ['Taylor', 'Dayle'])

You can also change the order of options by querying a fourth boolean argument:

->expectsChoice('What is your name?', 'Taylor', ['Taylor', 'Dayle'], true)

Default Values for @Props Blade Tag

@nihilsen contributed to the ability to define default supports in the following ways @props:

@props(['type', 'message'])
$type = $type ?? 'info'

@props(['type' => 'info', 'message'])

Remove An Order from a Query Builder

Jonathan Reinink reorder()orderBy()added a method to the query builder to reset calls:

$query = DB::table('users')->orderBy('name'); $unorderedUsers = $query->reorder()->get();

Reorder allows you to define the default layout in related tables with the ability to retract as needed:

class Account extends Model
public function users()
return $this->hasMany(User::class)->orderBy('name');
// Remove the name orderBy and order by email
// The same can be written as:

Release notes

Below is the full list of new features and updates, and you can see the differences between 7.3.0 and 7.4.0 on GitHub. You can find all version notes for Laravel 7.x in the latest v7 change log:



  • make:policymake customizable Brings ( # 32040 , 9d36a36 )
  • HigherOrderWhenProxyApplication for Collections ( # 32148 )
  • Illuminate\Testing\PendingCommand::expectsChoice()# 32139 )
  • Added support for default values for the "props" blade tag ( #32177 )
  • Added Castableinterface ( # 32129 , 9cbf908 , 651371a )
  • Added the ability to remove orders from query builder ( #32186 )


  • PendingMailFake::sendNow()and PendingMailFake::send()# 32093 ) has been added to the missing return
  • Pinning Custom Model Features ( #32118 )
  • Fixed route group ( #32135 , 870efef )


  • Remove Swift Mailer ties ( #32165 )
  • Add middleware.stub to files to be published while running Php artisan stub:publish# 32099 )
  • Php artisan stub:publish# 32100 ) add factory.stub to files to be published while running
  • Adding seeder.stub to files to be published while running Php artisan stub:publish# 32122 )


KARABAY A, 2020 . Laravel 7.4.0 Out,

(Accessed April 02, 2020).

  Share this post

Comments (0)


Sign up for the email newsletter to be the first to know about my blog posts