/** * Get the zinc content. * * @param Request $request * @param int $year * @param int $month * * @return \Illuminate\View\View */ public function show(Request $request, $year, $month) { $zinc = Zinc::with(['media'])->where('year', $year)->where('month', $month)->firstOrFail(); if (!$zinc->getAttribute('published') && is_null($request->user())) { throw new NotFoundHttpException(); } return view('zinc.show', compact('zinc')); }
/** * Get the zinc edit page. * * @param int $id * * @return \Illuminate\View\View */ public function edit($id) { $zinc = Zinc::with(['media'])->findOrFail($id); return view('zinc.manage.edit', compact('zinc')); }