add email signup flow
This commit is contained in:
parent
9945163a2f
commit
3dc9204979
27 changed files with 629 additions and 24 deletions
|
|
@ -11,7 +11,7 @@ return new class extends Migration
|
|||
Schema::create('users', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('email')->unique();
|
||||
$table->string('passwordHash');
|
||||
$table->string('passwordHash')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'email_confirmation_tokens',
|
||||
function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')
|
||||
->unique()
|
||||
->constrained('users')
|
||||
->cascadeOnDelete();
|
||||
$table->string('token', 64)->unique();
|
||||
$table->timestamp('available_to');
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('email_confirmation_tokens');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue