42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Websites\Schemas;
|
|
|
|
use App\Models\Tier;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class WebsiteForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('name')
|
|
->required(),
|
|
TextInput::make('domain')
|
|
->required(),
|
|
Select::make('tier_id')
|
|
->label('Tier')
|
|
->relationship('tier', 'name')
|
|
->required()
|
|
->searchable()
|
|
->preload(),
|
|
TextInput::make('cache_hit_rate_limit')
|
|
->required()
|
|
->numeric()
|
|
->default(100),
|
|
TextInput::make('external_api_rate_limit')
|
|
->required()
|
|
->numeric()
|
|
->default(10),
|
|
Toggle::make('is_active')
|
|
->required(),
|
|
Toggle::make('bypass_rate_limit')
|
|
->required(),
|
|
]);
|
|
}
|
|
}
|