fix: modifying borken profile items

This commit is contained in:
2024-01-13 13:15:24 -06:00
parent a989f3e92b
commit 040deb6456
6 changed files with 86 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ class ArtistController extends Controller
$user = auth()->user();
$artists = Artist::whereHas('artworks')
->withCount('artworks')
->withCount('episodes')
->orderBy('artworks_count', 'desc')
->paginate(100);
$podcasts = Podcast::where('published', true)->get();
@@ -65,6 +66,8 @@ class ArtistController extends Controller
{
$user = auth()->user();
$artist = Artist::where('slug', $slug)
->withCount('episodes')
->withCount('artworks')
->firstOrFail();
$artworks = Artwork::where('artist_id', $artist->id)
->with('episode')