php artisan migration with unique 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
});