Framework: Collections don't support whereNotIn

Created on 9 Jun 2017  路  3Comments  路  Source: laravel/framework

  • Laravel Version: 5.4.11
  • PHP Version: 5.6.30

Description:

The Laravel 5.4 documentation says that Collections support whereNotIn, but calling whereNotIn() on a collection produces

exception 'BadMethodCallException' with message 'Method whereNotIn does not exist.'

Steps To Reproduce:

$collection = collect($array);
$rowsToUpdate = $collection->whereIn('id', $existingIDs); //works
$rowsToInsert = $collection->whereNotIn('id', $existingIDs); //throws BadMethodCallException

Most helpful comment

It was added in v5.4.14.

All 3 comments

It was added in v5.4.14.

@guidocella Since that isn't mentioned in the website release notes, or the GitHub release notes, or in the documentation itself, where would we go to find that kind of information? I'm not used to new features being added in patch versions. I see the latest few GitHub releases do have notes, so is this something that the team recently started doing?

@kevinfoley It's mentioned in laravel/framework repo.
https://github.com/laravel/framework/blob/5.4/CHANGELOG-5.4.md#v5414-2017-03-01

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iivanov2 picture iivanov2  路  3Comments

YannPl picture YannPl  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

klimentLambevski picture klimentLambevski  路  3Comments

felixsanz picture felixsanz  路  3Comments