jeudi 9 février 2017

Laravel 5: How to verify if values separated by comma from a database table field are contained in an array?

So, basically I have a field in a table from my database which contains some values separated by comma (something like: "value1, value2, value3"). I need to check somehow if one or more of these values are contained in an array of values and retrieve the model(s). I'd like a solution using Eloquent Model Query to achieve this, if not possible with Model Query, then a Query Builder solution will be okay as well, or maybe something alternative.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire