By default, the package uses the Spatie\Passkeys\Models\Passkey
model to store passkeys. If you want to use a custom model, you can do so by following these steps.
##Step 1: Create a custom model
Create a new model that extends the Spatie\Passkeys\Models\Passkey
model.
namespace App\Models;
use Spatie\Passkeys\Models\Passkey as BasePasskey;
class Passkey extends BasePasskey
{
}
##Step 2: Update the configuration
Next, you need to update the config/passkeys.php
configuration file to use your custom model.
return [
'models' => [
'passkey_model' => App\Models\Passkey::class,
],
];