add: image and blog import

fix: category field to Entry model

feat: EntriesTable with searchable and sortable columns

chore: update CHANGELOG with recent additions and API updates
This commit is contained in:
jon brookes 2026-01-18 18:02:42 +00:00
parent 9f77f8b8d3
commit ccf38ef6f9
5 changed files with 235 additions and 2 deletions

View file

@ -17,18 +17,33 @@ class EntriesTable
{
return $table
->columns([
TextColumn::make('id')
->label('ID')
->sortable(query: function ($query, $direction) {
$query->orderBy('id', $direction);
}),
SpatieMediaLibraryImageColumn::make('featured_image')
->collection('featured-image')
->label('Image')
->circular()
->stacked()
->limit(3),
TextColumn::make('title')
->searchable(),
TextColumn::make('slug')
->searchable()
->sortable(),
TextColumn::make('category.name')
->label('Category')
->sortable(query: function ($query, $direction) {
$query->join('categories', 'entries.category_id', '=', 'categories.id')
->orderBy('categories.name', $direction)
->select('entries.*');
})
->searchable(),
IconColumn::make('is_published')
->label('pub')
->boolean(),
IconColumn::make('is_featured')
->label('feat')
->boolean(),
TextColumn::make('published_at')
->date()