/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $images = $this->photo->getGallery()->latest()->paginate(12); return view('gallery.index')->withImages($images); }