public static function form(Form $form): Form
{
return $form
->schema([
Section::make()
->visible(fn (Page $livewire) => $livewire instanceof CreateModel)
->schema([
// ...
]),
Section::make()
->visible(fn (Page $livewire) => $livewire instanceof EditModel)
->schema([
// ...
])
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
Section::make()
->visible(fn (Page $livewire) => $livewire instanceof CreateModel)
->schema([
// ...
]),
Section::make()
->visible(fn (Page $livewire) => $livewire instanceof EditModel)
->schema([
// ...
])
]);
}