add EmailConfirmationToken persistence: model, migration, eloquent + fake repo
This commit is contained in:
parent
9747d07c31
commit
e16cb45387
7 changed files with 288 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
<?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) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')
|
||||
->constrained('users')
|
||||
->cascadeOnDelete();
|
||||
$table->string('token')->unique();
|
||||
$table->dateTime('available_to');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('email_confirmation_tokens');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue