jeudi 14 novembre 2019

Laravel Eloquent - Multiple NOT LIKE queries?

i have a changeable output from database like this :

1,2,3,4 sometimes 5,4,9 Varies according to USERS

and i want make this ouput numbers as NOT LIKE in this laravel database query :

for example user 1

$products = \App\Product::where('user','1')->where(['category', 'not like', '1,2,3,4')->get();

user 2

$products = \App\Product::where('user','2')->where(['category', 'not like', '5,4,9')->get();

How can i do that ? Thank you so much in advance !



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire