Files
larapaper/database/migrations/2024_01_01_000000_create_passkeys_table.php
T
Benjamin NussbaumandCursor c5bf1bcd40 starter-kit-upgrade: Unified security, Vite 8, npm policy, passkeys
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>
2026-05-26 18:08:51 +02:00

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');
}
};