Laravel 6.15.1 Out

Collection Method

whereNull()and whereNotNull()added the method and gave some examples for pulling data:

Already available when building a query
$users = User::whereNotNull('email_verified_at')->get();
But when you have a collection you have to do this instead:
$users = User::all();
$unverifiedUsers = $users->whereStrict('is_verified_at', null);
$verifiedUsers = $users->where('is_verified_at', '!==', null);

With this PR, you can now:

$users = User::all();$unverifiedUsers = $users->whereNull('is_verified_at');
$verifiedUsers = $users->whereNotNull('is_verified_at');

Prickett MockStreamcontributed to a new class that you can see used in the following test example on the test base:

MockStream::register($mock);
$stream = fopen('mock://stream', 'r+');
$consoleOutputSections = [];
$mock->shouldReceive('section')
->andReturn(new ConsoleSectionOutput)
$stream,
$consoleOutputSections,
Output::VERBOSITY_NORMAL,
false,
new OutputFormatter)
);
// ...
MockStream::restore();

Check out PR #31447 For more details.

Here's a full list of new features and updates on GitHub, and the differences between 6.15.0 and 6.15.1. You can find all version notes for Laravel 6.0 in the latest v6 change log:

v6.15.1

Added

  • Added whereNulland whereNotNull# 31425 )
  • Added Illuminate\Foundation\Testing\MockStream class ( # 31447 )

constant

  • event:listCommand to show unregistered activities ( # 31444 )
  • ( #31448 , b3d0da1 ) for nested json arrays with corrected postgres

  Quote

KARABAY A, 2020 . Laravel 6.15.1 Out,

https://www.karabayyazilim.com/blog/laravel-6151-cikti-2020-02-18-211952

(Accessed February 18, 2020).


  Share this post

Comments (0)

Comment

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