1. Home
  2. Laravel
  3. 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
NordVPN NordVPN