How to add a repeating infolist to show all records from a resource?

I can see how to define an infolist but would like to give it a datasource of Model::all() to show all records as cards. I'd like to add this to a custom page or if it's easier I can create a new resource.
Effectively I need a list page but in a grid format instead of a table. Any suggestions gratefully received, can't tell from the docs if I need to create a custom livewire component or if I can add it to a resource page?
Solution:
So Figured it out. The columns needs some type of formatting for the contentGrid to work. ``` public function table(Table $table): Table { return $table->query(VisaType::query())...
Jump to solution
2 Replies
acroninja
acroninjaOP16mo ago
I've found the table content grid -> AMAZING - super useful but can't figure out how to add the content.
Solution
acroninja
acroninja16mo ago
So Figured it out. The columns needs some type of formatting for the contentGrid to work.
public function table(Table $table): Table {
return $table->query(VisaType::query())
->contentGrid([
'md' => 2,
'xl' => 3,
])
->columns([
Split::make(
[
TextColumn::make('name')->searchable(),
TextColumn::make('description')->searchable()
]
)])->paginated(false);
}
public function table(Table $table): Table {
return $table->query(VisaType::query())
->contentGrid([
'md' => 2,
'xl' => 3,
])
->columns([
Split::make(
[
TextColumn::make('name')->searchable(),
TextColumn::make('description')->searchable()
]
)])->paginated(false);
}
Want results from more Discord servers?
Add your server