public function albumLists(Infolist $infolist): Infolist
{
return $infolist
->state([
'albums' => $this->getTableRecords(),
])
->schema([
RepeatableEntry::make('albums')
->hiddenLabel()
->schema([
Split::make([
Grid::make(1)
->schema([
TextEntry::make('name')
->hiddenLabel(),
TextEntry::make('lyric_count')
->hiddenLabel(),
TextEntry::make('detail')
->hiddenLabel(),
RepeatableEntry::make('artists')
->schema([
TextEntry::make('name')
->badge()
->hiddenLabel(),
]),
]),
ImageEntry::make('image')
->hiddenLabel()
->grow(false),
])->from('lg'),
]),
]);
}
public function table(Table $table): Table
{
return $table
->query(
Album::query()
->with('artists')
->withCount('lyric')
->latest()
)
->paginated(['']);
}
public function albumLists(Infolist $infolist): Infolist
{
return $infolist
->state([
'albums' => $this->getTableRecords(),
])
->schema([
RepeatableEntry::make('albums')
->hiddenLabel()
->schema([
Split::make([
Grid::make(1)
->schema([
TextEntry::make('name')
->hiddenLabel(),
TextEntry::make('lyric_count')
->hiddenLabel(),
TextEntry::make('detail')
->hiddenLabel(),
RepeatableEntry::make('artists')
->schema([
TextEntry::make('name')
->badge()
->hiddenLabel(),
]),
]),
ImageEntry::make('image')
->hiddenLabel()
->grow(false),
])->from('lg'),
]),
]);
}
public function table(Table $table): Table
{
return $table
->query(
Album::query()
->with('artists')
->withCount('lyric')
->latest()
)
->paginated(['']);
}