Schema::create('users', function (BluePrint $table) { $table->bigIncrements(); $table->string('screen_name')->index(); // ←論理削除があるので ->unique() にはできない $table->softDeletes(); }); After MySQL5.7から使える生成カラムと,ユニーク制約がNULLには適用されないことを利用します。アプリケーション側のコードには,一切手を加える必要がありません。 Schema::create('users', function (BluePrint $table) { $table->bigIncrements(); $table->string('screen_name'); $table->softDeletes(); //