// ... inside CustomerResource.php
public static function form(Form $form): Form
{
return $form->schema([
Forms\Components\Section::make('General')->schema([
// ... all fields for consumer
]),
Forms\Components\Section::make('Address')
->relationship('address')
->schema([
Forms\Components\TextInput::make('first_line')
->required()
->maxLength(255),
Forms\Components\TextInput::make('second_line')
->required()
->maxLength(255),
Forms\Components\TextInput::make('country')
->required()
->maxLength(255),
])
]);
}
// ... inside CustomerResource.php
public static function form(Form $form): Form
{
return $form->schema([
Forms\Components\Section::make('General')->schema([
// ... all fields for consumer
]),
Forms\Components\Section::make('Address')
->relationship('address')
->schema([
Forms\Components\TextInput::make('first_line')
->required()
->maxLength(255),
Forms\Components\TextInput::make('second_line')
->required()
->maxLength(255),
Forms\Components\TextInput::make('country')
->required()
->maxLength(255),
])
]);
}