How to Use The whereIn() and whereNotIn() Laravel Methods - Mastering Eloquent & Collection Methods

Subscribers:
64,200
Published on ● Video Link: https://www.youtube.com/watch?v=PE8peUmoGJQ



Category:
Tutorial
Duration: 4:10
638 views
37


In this tutorial, we will cover the whereIn() and whereNotIn() methods in Laravel Collections. These Laravel methods allow you to filter a collection based on multiple values, and are useful when you have an array of values and want to find all the records in a collection that match one or more of those values. We will demonstrate how these methods work by using the User model to find all users that have a certain role, and excluding specific values from our query. These Laravel methods are powerful because they allow you to find records that match or do not match any value in the array, and you can use them to find all the records in one query, making your code more readable and maintainable. We will also show you how to chain these methods with others to customize your queries.

πŸ“š New Udemy Course
If you're looking to level up your Laravel skills? My new course "Mastering Laravel 10 Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: https://www.udemy.com/course/mastering-laravel-10-query-builder-eloquent-relationships/?referralCode=C784C3DB5B8925207FCB

πŸ“² Let’s plan a meeting
Plan a (paid) 1-hour meeting on Calendly to do portfolio reviews, code reviews resume reviews, or a coaching session for Laravel: https://calendly.com/codewithdary

πŸ’Œ Newsletter
Sign up for my free weekly email newsletter: https://newsletter.codewithdary.com/

πŸ”₯ Resources
- Twitter: https://twitter.com/codewithdary
- Instagram: https://www.instagram.com/codewithdary
- Blog: https://blog.codewithdary.com
- Patreon: https://www.patreon.com/user?u=30307830
- GitHub: https://github.com/codewithdary
- TikTok: https://www.tiktok.com/@codewithdary

πŸ“‹ Table of Content
00:00 -whereIn()
02:01 - whereNotIn()
03:46 - Outro

#laravel #php #codewithdary




Other Videos By Code With Dary


2023-05-03How to Use The Powerful reject() Method in Laravel - Mastering Eloquent & Collection Methods
2023-05-02How to EASILY Convert Strings to Title Case in Laravel #laravel #shorts
2023-05-01Laravel Magic: Converting Plural Words to Singular with Just One Method #laravel #shorts
2023-05-01How to Use The Powerful filter() Method in Laravel - Mastering Eloquent & Collection Methods
2023-04-28How to Mask Sensitive Data in Your Laravel Application #laravel #shorts
2023-04-28The Hidden Laravel Methods to Filter Based on Date & Time - Mastering Eloquent & Collection Methods
2023-04-27Truncating a String Based on Words in Laravel?! #laravel #shorts
2023-04-26How to Use The whereNull() and whereNotNull() Methods - Mastering Eloquent & Collection Methods
2023-04-26The EASIEST Method to Convert a String to Camel Case in Laravel #laravel #shorts
2023-04-25The EASIEST Method to Convert a String to Camel Case in Laravel #laravel #shorts
2023-04-24How to Use The whereIn() and whereNotIn() Laravel Methods - Mastering Eloquent & Collection Methods
2023-04-24The Simplest Way to Generate SEO-Friendly Slugs in Laravel #laravel #shorts
2023-04-21Encrypting Laravel Sessions is EXTREMELY Easy #laravel #shorts
2023-04-21The where(), whereStrict() And whereBetween() Methods - Mastering Eloquent & Collection Methods
2023-04-20Can You Customize The API Prefix For API Routes in Laravel?! #laravel #shorts
2023-04-19Make Working With Numbers in Collections EXTREMELY Easy - Mastering Eloquent & Collection Methods
2023-04-18Does Laravel Have a Global Method to Retrieve The URL?! #laravel #shorts
2023-04-17Introduction to Collections & Project Setup - Mastering Eloquent & Collection Methods
2023-04-17Laravel Sanctum Tokens: Customizing Expiration Time for Your API Authentication #laravel #shorts
2023-04-14Boost Your Query Speed in Laravel with This One Simple Trick #laravel #shorts
2023-04-14What is The Difference Between the find() and findOrFail() Methods in Laravel?



Tags:
introduction to collections
introduction to laravel collections
learn collections in laravel
introduction to laravel 10
learn laravel collections step by step
learn laravel for beginners
collection methods in laravel
what is eloquent in laravel
learn laravel 10
laravel 10 from scratch
laravel 10 for beginners
laravel 10 tutorial youtube
how to use collection methods in laravel
laravel 10 tutorial 2023
complete laravel 10
complete laravel 10 database