F
Filamentβ€’3mo ago
Jakub

is it possible to move relationship manager into infolist table

How it looks atm
No description
Solution:
Create a custom view. I too moved my relation managers above the infolist. It should be possible I think. https://filamentphp.com/docs/3.x/panels/resources/viewing-records#custom-view...
Jump to solution
5 Replies
Jakub
Jakubβ€’3mo ago
I want to make a layout like this? Not sure if it breaks things
No description
Jakub
Jakubβ€’3mo ago
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Grid::make([
'default' => 1,
'lg' => 3,
])->schema([
Grid::make([
'default' => 1,
])->schema([
//
])->columnSpan(2),
Grid::make([
'default' => 1,
])->schema([
Infolists\Components\Section::make('Overview')
->schema([
TextEntry::make('name'),
TextEntry::make('membership_expires_at')
]),

Infolists\Components\Section::make('Overview')
->schema([
TextEntry::make('name'),
TextEntry::make('notes'),
TextEntry::make('notes'),
TextEntry::make('notes'),
]),
])->columnSpan(1),
])
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Grid::make([
'default' => 1,
'lg' => 3,
])->schema([
Grid::make([
'default' => 1,
])->schema([
//
])->columnSpan(2),
Grid::make([
'default' => 1,
])->schema([
Infolists\Components\Section::make('Overview')
->schema([
TextEntry::make('name'),
TextEntry::make('membership_expires_at')
]),

Infolists\Components\Section::make('Overview')
->schema([
TextEntry::make('name'),
TextEntry::make('notes'),
TextEntry::make('notes'),
TextEntry::make('notes'),
]),
])->columnSpan(1),
])
]);
}
public static function getRelations(): array
{
return [
RelationManagers\MembershipRecordsRelationManager::class,
];
}
public static function getRelations(): array
{
return [
RelationManagers\MembershipRecordsRelationManager::class,
];
}
Solution
hrank8t
hrank8tβ€’3mo ago
Create a custom view. I too moved my relation managers above the infolist. It should be possible I think. https://filamentphp.com/docs/3.x/panels/resources/viewing-records#custom-view
Jakub
Jakubβ€’3mo ago
aah idk how i missed that, thanks i was wondering about that
hrank8t
hrank8tβ€’3mo ago
Do share the code, your design looks good. Maybe I'll use it somewhere too. πŸ˜‰