mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-26 18:32:00 +07:00
40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Users\Schemas;
|
|
|
|
use Filament\Forms\Components\DateTimePicker;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class UserForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('name')
|
|
->required(),
|
|
TextInput::make('email')
|
|
->label('Email address')
|
|
->email()
|
|
->required(),
|
|
DateTimePicker::make('email_verified_at'),
|
|
TextInput::make('password')
|
|
->password(),
|
|
TextInput::make('avatar_url')
|
|
->url(),
|
|
TextInput::make('xp_points')
|
|
->required()
|
|
->numeric()
|
|
->default(0),
|
|
TextInput::make('current_streak')
|
|
->required()
|
|
->numeric()
|
|
->default(0),
|
|
Textarea::make('metadata')
|
|
->columnSpanFull(),
|
|
]);
|
|
}
|
|
}
|