how to give a attribute a unqiue key in laravel code example
Example: laravel migration add unique column
Schema::table('tableName', function($table)
{
$table->string('column-name')->unique(); //notice the parenthesis I added
});
Schema::table('tableName', function($table)
{
$table->string('column-name')->unique(); //notice the parenthesis I added
});