public function update($id) { $cover = ForumCover::findOrFail($id); if (Request::hasFile('cover_file') === true) { try { $cover = $cover->updateFile(Request::file('cover_file')->getRealPath(), Auth::user()); } catch (ImageProcessorException $e) { return error_popup($e->getMessage()); } } return fractal_item_array($cover, new ForumCoverTransformer()); }
public function update($id) { $cover = ForumCover::findOrFail($id); $cover->update($this->coverParams()); return redirect(route('admin.forum.forum-covers.index') . '#forum-' . $cover->forum_id); }