Compare commits
No commits in common. "b8d1a164f19f27b1cb41fd93853a032a7ecf1812" and "eb931bbb6a33f212318ff79f278fef3977d289b7" have entirely different histories.
b8d1a164f1
...
eb931bbb6a
@ -52,9 +52,10 @@ public function show(Request $request, $podcast_slug, $slug)
|
|||||||
{
|
{
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$episode = Episode::where('slug', $slug)
|
$episode = Episode::where('slug', $slug)
|
||||||
->with('approvedArtworks')
|
->with('artworks')
|
||||||
->with('artwork')
|
->with('artwork')
|
||||||
->with('podcast')
|
->with('podcast')
|
||||||
|
->whereNotNull('artworks.approved_by')
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
$podcasts = Podcast::where('published', true)->with('episodes', function ($query) {
|
$podcasts = Podcast::where('published', true)->with('episodes', function ($query) {
|
||||||
$query->orderBy('episode_number', 'desc');
|
$query->orderBy('episode_number', 'desc');
|
||||||
@ -66,7 +67,6 @@ public function show(Request $request, $podcast_slug, $slug)
|
|||||||
'pageTitle' => '"' . $episode->title . '" ' . $episode->podcast->name . ' Episode ' . number_format($episode->episode_number + 0),
|
'pageTitle' => '"' . $episode->title . '" ' . $episode->podcast->name . ' Episode ' . number_format($episode->episode_number + 0),
|
||||||
'podcast' => $episode->podcast,
|
'podcast' => $episode->podcast,
|
||||||
'episode' => $episode,
|
'episode' => $episode,
|
||||||
'artworks' => $episode->approvedArtworks,
|
|
||||||
'podcasts' => $podcasts,
|
'podcasts' => $podcasts,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -31,11 +31,6 @@ public function artwork()
|
|||||||
return $this->hasOne(Artwork::class, 'id', 'artwork_id');
|
return $this->hasOne(Artwork::class, 'id', 'artwork_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function approvedArtworks()
|
|
||||||
{
|
|
||||||
return $this->hasMany(Artwork::class)->whereNotNull('artworks.approved_by');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function artworks()
|
public function artworks()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Artwork::class);
|
return $this->hasMany(Artwork::class);
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
{{ $episode->episode_date->format('Y') }}</h4>
|
{{ $episode->episode_date->format('Y') }}</h4>
|
||||||
<h4 class="mb-4">Artwork By: <a href="/artist/{{ $episode->artwork->artist->slug }}">{{ $episode->artwork->artist->name }}</a></h4>
|
<h4 class="mb-4">Artwork By: <a href="/artist/{{ $episode->artwork->artist->slug }}">{{ $episode->artwork->artist->name }}</a></h4>
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
{{ number_format($artworks->count()) }} Artworks Submitted.
|
{{ number_format($episode->artworks->count()) }} Artworks Submitted.
|
||||||
</p>
|
</p>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -88,14 +88,14 @@ class="ri-broadcast-line"></i>
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
<span class="subtitle">Other Submitted Artworks</span>
|
<span class="subtitle">Other Submitted Artworks</span>
|
||||||
<h3>{{ number_format($artworks->count() - 1) }} other art pieces submitted</h3>
|
<h3>{{ number_format($episode->artworks->count() - 1) }} other art pieces submitted</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{-- End .section-title --}}
|
{{-- End .section-title --}}
|
||||||
<div class="grid-filter-wrapper masonry-list">
|
<div class="grid-filter-wrapper masonry-list">
|
||||||
<div class="resizer"></div>
|
<div class="resizer"></div>
|
||||||
@foreach ($artworks as $recent)
|
@foreach ($episode->artworks as $recent)
|
||||||
@if ($recent->id != $episode->artwork_id)
|
@if ($recent->id != $episode->artwork_id)
|
||||||
@php
|
@php
|
||||||
$thisArtwork = $recent;
|
$thisArtwork = $recent;
|
||||||
|
Loading…
Reference in New Issue
Block a user