Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel One Time Passwords Laravel Package

spatie/laravel-one-time-passwords

Generate and verify secure one-time passwords (6‑digit by default) in Laravel. Sends OTPs via mail notifications (extendable to SMS/other channels) and includes a Livewire login component. Optional Flux support provides an enhanced OTP input UI.

View on GitHub
Deep Wiki
Context7

title: Using your own model weight: 3

By using a custom model, you can change low-level behaviour of the package, such as setting a different table name or db connection, adding custom properties, or overriding methods.

Step 1: Create a custom model

Create a new model that extends the Spatie\OneTimePasswords\Models\OneTimePassword model.

namespace App\Models;

use Spatie\OneTimePasswords\Models\OneTimePassword as BaseOneTimePassword;

class CustomOneTimePassword extends BaseOneTimePassword
{
    // Add any custom properties or methods here
}

Step 2: Update the configuration

Next, you need to update the config/one-time-passwords.php configuration file to use your custom model.

// config/one-time-passwords.php

return [
    // ...
    'models' => [
        // The model used to store one-time passwords
        'model' => App\Models\CustomOneTimePassword::class,
    ],
];
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai