33 lines
979 B
PHP
33 lines
979 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\NavigationLinks\Schemas;
|
|
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
|
|
class NavigationLinkForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Section::make()
|
|
->schema([
|
|
TextInput::make('name')
|
|
->label('Nazwa')
|
|
->required()
|
|
->maxLength(2048),
|
|
TextInput::make('link')
|
|
->label('Link')
|
|
->required()
|
|
->maxLength(2048),
|
|
Toggle::make('external')
|
|
->label('Zewnętrzny link')
|
|
->required(),
|
|
]),
|
|
]);
|
|
}
|
|
}
|