Files
travel/app/Filament/Resources/Users/Schemas/UserForm.php
Tim Basten 564f78dcda
All checks were successful
linter / quality (push) Successful in 1m37s
tests / ci (8.4) (push) Successful in 2m13s
tests / ci (8.5) (push) Successful in 1m25s
initial
2026-03-05 11:41:39 +08:00

44 lines
1.1 KiB
PHP

<?php
namespace App\Filament\Resources\Users\Schemas;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
use Spatie\Permission\Models\Role;
class UserForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('name')
->required()
->maxLength(255),
TextInput::make('email')
->email()
->required()
->maxLength(255),
TextInput::make('username')
->maxLength(255),
TextInput::make('phone')
->maxLength(50),
TextInput::make('department')
->maxLength(255),
TextInput::make('title')
->maxLength(255),
Select::make('roles')
->relationship('roles', 'name')
->multiple()
->preload(),
]);
}
}