Skip to content

Instantly share code, notes, and snippets.

@kohki-shikata
Last active February 15, 2025 08:02
Show Gist options
  • Save kohki-shikata/a320ae92feec1cdd6c9e83c1faa55324 to your computer and use it in GitHub Desktop.
Save kohki-shikata/a320ae92feec1cdd6c9e83c1faa55324 to your computer and use it in GitHub Desktop.
secret user login with laravel
Schema::create('medical_workers', function (Blueprint $table) {
$table->increments('id'); // BigIncrementsで、PK。おまじない。
$table->string('name')->unique(); // あえてnameはユニーク
$table->string('secret_question'); // 秘密の質問。平文
$table->string('secret_question'); // 秘密の質問の回答。ハッシュ化文字列で来てほしい。
$table->datetime('created_at');
$table->datetime('updated_at')->nullable();
$table->datetime('deleted_at')->nullable();
});
Schema::create('invite_token', function (Blueprint $table) {
$table->increments('id'); // BigIncrementsで、PK。おまじない。
$table->string('token')->unique(); // ランダム文字列の生成
$table->datetime('created_at');
$table->datetime('updated_at')->nullable();
$table->datetime('deleted_at')->nullable();
});
Schema::create('invite_token', function (Blueprint $table) {
$table->increments('id'); // BigIncrementsで、PK。おまじない。
$table->string('token')->unique(); // ランダム文字列の生成
$table->datetime('created_at');
$table->datetime('updated_at')->nullable();
$table->datetime('deleted_at')->nullable();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment