WhereIn Laravel Query with Example -

SELECT * FROM Customers WHERE Country NOT IN ('Germany', 'France', 'UK');

Below is an example of whereIn laravel query

Here, we will get the data based on the condition array from a table name “product_info”

DB::table('product_info')->whereIn('quantity',[3,6])->get(); 
//or
DB::table('product_info')->whereIn('quantity',$quantity_array)->get();

--

--

Hi, This is Biplab and I am web developer well versed in PHP and other open source technologies. I am here to share my experience with the community.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store