I need to do following
Model::select('column')->whereIn('column','!=',array)->first();
So how can i achieve this. Any suggestions Thank you.
I need to do following
Model::select('column')->whereIn('column','!=',array)->first();
So how can i achieve this. Any suggestions Thank you.
Instead of whereIn you can use whereNotIn.
Like this:
Model::select('column')->whereNotIn('column', array(1,2,3))->first();
Use
Model::whereNotIn('id',[10,20])->select('id')->first();
Go through Laravel Eloquent “WHERE NOT IN”