<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
murillo-cardoso-by-hasan-ahani / filament-otp-input example snippets
use HasanAhani\FilamentOtpInput\Components;
use Filament\Forms\Form;
public function form(Form $form): Form
{
return $form
->schema([
// ...
OtpInput::make('otp')
->label('Otp'),
]);
}
use HasanAhani\FilamentOtpInput\Components;
use Filament\Forms\Form;
public function form(Form $form): Form
{
return $form
->schema([
// ...
OtpInput::make('otp')
->numberInput(6)
->label('Otp'),
]);
}
use HasanAhani\FilamentOtpInput\Components;
use Filament\Forms\Form;
public function form(Form $form): Form
{
return $form
->schema([
// ...
OtpInput::make('otp')
->numberInput(8)
->afterStateUpdated(function (string $state){
dd($state);
// submit form or save record
})
->label('Otp'),
]);
}
use HasanAhani\FilamentOtpInput\Components;
use Filament\Forms\Form;
public function form(Form $form): Form
{
return $form
->schema([
// ...
OtpInput::make('otp')
->password()
// or
->text()
->label('Otp'),
]);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.