1. Home
  2. ›
  3. Laravel
  4. ›
  5. Unique record

Unique function protects database from holding multiple records with the same value.

#laravel#migration#db
// Inside of a migration
$table->string('category')->unique(); // Only one category of each type will be crated.
copy
Full Laravel cheatsheet