framework icon indicating copy to clipboard operation
framework copied to clipboard

[9.x] Add like operator to collections

Open imanghafoori1 opened this issue 3 years ago • 0 comments

Adds SQL-like operator to the Laravel collections.

Usage:

$collection->where('name', 'like', 'Lara%')->all();

Thanks to this question/answer: https://stackoverflow.com/questions/4912294/php-like-thing-similar-to-mysql-like-for-if-statement

imanghafoori1 avatar Aug 09 '22 21:08 imanghafoori1

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!

If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

taylorotwell avatar Aug 11 '22 17:08 taylorotwell