-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I'm using NestableTrait in my model. I want to use where to select some of the rows. My model is Category
Category::where('name', "Clothes"); works fine. But if I want to use it like this:
Category::where('name', 'LIKE', "%Clothes%"); it doesn't have any items in it.
When I use a raw query to get the columns it has some items in it:
collect(DB::select("SELECT * FROM categoriesWHEREname LIKE '%clothes%';"));
Any idea how I can fix this? I would have used the raw query but I want the model's relations as well, and it doesn't make any sense to add the relations by join when I can simply use the model.
Metadata
Metadata
Assignees
Labels
No labels