class SectionDetails extends Page
{
protected static bool $shouldRegisterNavigation = false;
protected static ?string $slug = 'manage-sections/{section}';
public ?Section $section = null;
public function mount(Section $section): void
{
$this->section = $section;
}
public function schema(Schema $schema): Schema
{
return $schema
->record($this->section)
->components([
Tabs::make('Tabs')
->tabs([
Tab::make('Details')
->schema([
TextEntry::make('name')->label('Section Name'),
TextEntry::make('course.name')->label('Course'),
// This works with TextEntry but not RepeatableEntry
RepeatableEntry::make('students')
->schema([
TextEntry::make('name')->label('Student Name'),
TextEntry::make('email')->label('Email'),
])
->columns(1)
->contained(false)
->grid(3),
]),
]),
]);
}
}
class SectionDetails extends Page
{
protected static bool $shouldRegisterNavigation = false;
protected static ?string $slug = 'manage-sections/{section}';
public ?Section $section = null;
public function mount(Section $section): void
{
$this->section = $section;
}
public function schema(Schema $schema): Schema
{
return $schema
->record($this->section)
->components([
Tabs::make('Tabs')
->tabs([
Tab::make('Details')
->schema([
TextEntry::make('name')->label('Section Name'),
TextEntry::make('course.name')->label('Course'),
// This works with TextEntry but not RepeatableEntry
RepeatableEntry::make('students')
->schema([
TextEntry::make('name')->label('Student Name'),
TextEntry::make('email')->label('Email'),
])
->columns(1)
->contained(false)
->grid(3),
]),
]),
]);
}
}