/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function publish($slug) { $gallery = Gallery::findBySlug($slug); $gallery->update(['is_published' => $gallery->is_published ? 0 : 1]); return Redirect::route('galleries.admin'); }