Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

unique laravel migration

use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;

Schema::table('users', function (Blueprint $table) {
    $table->string('email')->unique();
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #unique #laravel #migration
ADD COMMENT
Topic
Name
8+3 =