I am building a lead management system using laravel10 and I had several tables like lead,individualLead,BusinessLead,Statuses,sources,etc The statuses table can have values like Cancelled,Pending,Followup started, Completed etc. While seeding the database the same values are feeded as multiple entries to the table ,how to make sure that the table only has unique and relevant data while seeding the database. I am also building the Api's for these ta[[[enter image description here](https://i.stack.imgur.com/Wjh5R.png)](https://i.stack.imgur.com/IgA37.png)](https://i.stack.imgur.com/LLUYQ.png)bles too
I had tried to add unique() constrain, as well as looping while seeding the table
Use
faker
to generate unique values:'contact_no' => $this->faker->unique()->phoneNumber,
'email' => $this->faker->unique()->safeEmail,
In migration table: