Answers for "string unique in migration in laravel 8"

PHP
0

unique laravel migration

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Schema::table('users', function (Blueprint $table) {
    $table->string('email')->unique();
});
Posted by: Guest on September-02-2021
1

laravel migration alter column unique

$table->dropUnique('users_email_unique');
Posted by: Guest on August-31-2021

Code answers related to "string unique in migration in laravel 8"

Browse Popular Code Answers by Language