Skip to content

Commit

Permalink
Update GalleryController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
AW0005 authored Oct 29, 2024
1 parent eb63b11 commit 2f44b22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/GalleryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function getGallery($id, Request $request) {
return view('galleries.gallery', [
'gallery' => $gallery,
'submissions' => $query->paginate(20)->appends($request->query()),
'prompts' => [0 => 'Any Prompt'] + Prompt::whereIn('id', GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted()->whereNotNull('prompt_id')->pluck('prompt_id')->toArray())->orderBy('name')->pluck('name', 'id')->toArray(),
'prompts' => [0 => 'Any Prompt'] + Prompt::whereIn('id', GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted()->whereNotNull('prompt_id')->select('prompt_id')->distinct()->pluck('prompt_id')->toArray())->orderBy('name')->pluck('name', 'id')->toArray(),
'childSubmissions' => GallerySubmission::whereIn('gallery_id', $gallery->children->pluck('id')->toArray())->where('is_visible', 1)->where('status', 'Accepted'),
'galleryPage' => true,
'sideGallery' => $gallery,
Expand Down

0 comments on commit 2f44b22

Please sign in to comment.