Answers for "how to make name field unique key in laravel"

PHP
1

laravel set field unique

Schema::table('manufacturers', function($table)
{
    $table->string('name')->unique(); 
});
Posted by: Guest on March-31-2020
0

laravel composite unique key

$table->unique(['mytext', 'user_id']);
Posted by: Guest on October-13-2021

Code answers related to "how to make name field unique key in laravel"

Browse Popular Code Answers by Language