Skip to content
Advertisement

laravel seeds unique column ignore duplicate entries

i have a Seeder in Laravel

JavaScript

in this email is unique,

JavaScript

when I run first time its entering records into the database, when I run again its showing duplicate entry.

JavaScript

do i have option to ignore that.?

Advertisement

Answer

We have an option to check whether the given email exists in the table or not.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement