Answer the question
In order to leave comments, you need to log in
Why doesn't the LIKE operator work when fetching from a collection?
We have a collection of objects, they have "slug" => "slug-ru"
$collection->where('slug', 'LIKE', 'slug')->first() // работает
$collection->where('slug', 'LIKE', 'slug%')->first() // нет
$collection->where('slug', 'LIKE', '%slug%')->first() // нет
Answer the question
In order to leave comments, you need to log in
like database function
collection is just an array, so it can't do that.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question