Filament v5: Forms\Components\Section → Schemas\Components\Section, Forms\Get → Schemas\Components\Utilities\Get
Layout components (Section, Grid, Tabs, etc.) au fost mutate din Filament\Forms\Components în Filament\Schemas\Components. Forms\Components păstrează doar field-urile (TextInput, Select, etc.). Forms\Get s-a mutat în Schemas\Components\Utilities\Get.
This commit is contained in:
@@ -10,6 +10,7 @@ use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Actions;
|
||||
use Filament\Schemas;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
@@ -32,7 +33,7 @@ class LeadResource extends Resource
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema->components([
|
||||
Forms\Components\Section::make('Contact')
|
||||
Schemas\Components\Section::make('Contact')
|
||||
->columns(2)
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('name')->label('Nume')->required()->maxLength(120),
|
||||
@@ -43,14 +44,14 @@ class LeadResource extends Resource
|
||||
->default('new')
|
||||
->required(),
|
||||
]),
|
||||
Forms\Components\Section::make('Auto')
|
||||
Schemas\Components\Section::make('Auto')
|
||||
->columns(2)
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('car')->label('Marca')->maxLength(60),
|
||||
Forms\Components\TextInput::make('model')->maxLength(60),
|
||||
]),
|
||||
Forms\Components\Textarea::make('message')->label('Mesaj client')->columnSpanFull()->rows(3),
|
||||
Forms\Components\Section::make('Sursă & Atribuire')
|
||||
Schemas\Components\Section::make('Sursă & Atribuire')
|
||||
->columns(2)
|
||||
->schema([
|
||||
Forms\Components\Select::make('source')
|
||||
@@ -63,7 +64,7 @@ class LeadResource extends Resource
|
||||
->searchable(),
|
||||
Forms\Components\TextInput::make('budget')->label('Buget')->numeric(),
|
||||
]),
|
||||
Forms\Components\Section::make('Marketing (UTM)')
|
||||
Schemas\Components\Section::make('Marketing (UTM)')
|
||||
->collapsed()
|
||||
->columns(2)
|
||||
->schema([
|
||||
|
||||
Reference in New Issue
Block a user