feat: increase gallery grid from 4 to 5 columns per row on desktopfeat: increase gallery grid from 4 to 5 columns per row on desktop

This commit is contained in:
2026-02-25 19:11:23 +01:00
parent 5c97488e80
commit 0032aec02f
131 changed files with 15674 additions and 597 deletions

View File

@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
namespace App\Jobs;
use App\Models\Artwork;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
/**
* Queued job: index (or re-index) a single Artwork in Meilisearch.
*/
class IndexArtworkJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public int $tries = 3;
public int $timeout = 30;
public function __construct(public readonly int $artworkId) {}
public function handle(): void
{
$artwork = Artwork::with(['user', 'tags', 'categories', 'stats', 'awardStat'])
->find($this->artworkId);
if (! $artwork) {
return;
}
if (! $artwork->is_public || ! $artwork->is_approved || ! $artwork->published_at) {
// Not public/approved — ensure it is removed from the index.
$artwork->unsearchable();
return;
}
$artwork->searchable();
}
public function failed(\Throwable $e): void
{
Log::error('IndexArtworkJob failed', [
'artwork_id' => $this->artworkId,
'error' => $e->getMessage(),
]);
}
}