quiniela-sembradores-backend/app/Filament/Resources/Teams/Schemas/TeamForm.php

32 lines
924 B
PHP
Raw Normal View History

2026-03-19 23:45:46 -06:00
<?php
namespace App\Filament\Resources\Teams\Schemas;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
use Illuminate\Support\Str;
class TeamForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('name')
->required()
->live(onBlur: true),
TextInput::make('short_name'),
TextInput::make('slug')
->required()
->hiddenOn('create')
->dehydrateStateUsing(fn (?string $state): string => Str::slug((string) $state)),
TextInput::make('fifa_code'),
TextInput::make('flag_url')
->url(),
Toggle::make('is_active')
->required(),
]);
}
}