mirror of
https://github.com/usetrmnl/larapaper.git
synced 2026-08-13 14:28:54 -07:00
Upstream: laravel/livewire-starter-kit@6e000a1 @3b84d57 @89c9953 @43dc8f1 (combined; manifests overlap) - Consolidate password/2FA/passkeys on settings/security with password.confirm - Vite 8 + laravel-vite-plugin ^3, remove axios, add .npmrc ignore-scripts - Fortify passkeys + rate limiter, User PasskeyAuthenticatable, passkey UI and migration Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
895 B
PHP
36 lines
895 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Laravel\Passkeys\Passkeys;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('passkeys', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignIdFor(Passkeys::userModel(), 'user_id')->constrained()->cascadeOnDelete();
|
|
$table->string('name');
|
|
$table->string('credential_id')->unique();
|
|
$table->json('credential');
|
|
$table->timestamp('last_used_at')->nullable();
|
|
$table->timestamps();
|
|
|
|
$table->index('user_id');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('passkeys');
|
|
}
|
|
};
|