Forum Laravel Check for duplicates in the same table
Hi!
I have a table containing 7 000 accounts with an email address and I want to check if any of these records are duplicates (email). What is the easiest way of doing that? Is it to fetch all records and run a foreach to the DB?
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
Check for duplicates in the same table
Hi!
I have a table containing 7 000 accounts with an email address and I want to check if any of these records are duplicates (email). What is the easiest way of doing that? Is it to fetch all records and run a foreach to the DB?