/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     try {
         $gallery = Gallery::with('pictures')->findOrFail($id);
     } catch (Exception $e) {
         return back()->with('error', trans('default.gallerynotfound'));
     }
     $title = $gallery->{'name_' . App::getLocale()};
     //$pictures = File::files(base_path() . '/public/images/galleries/' . $gallery->id);
     return view('galleries.show', compact('title', 'gallery'));
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     return Gallery::with('GalleryImages')->find($id);
 }
Beispiel #3
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     return Gallery::with('user')->where('id', $id)->first();
 }
Beispiel #4
0
 public function getSingleGallery($id)
 {
     $gallery = Gallery::with('user')->where('id', $id)->first();
     $gallery->images = $this->getGalleryImageUrls($id, $gallery->id);
     return $gallery;
 }