/** * Update the specified resource in storage. * * @param TimelineMarkRequest $request * @param string $slug * @return \Illuminate\Http\Response */ public function update(TimelineMarkRequest $request, $slug) { $data = $request->all(); $timelineMark = $this->repository->findBySlug($slug); $this->repository->update($data, $timelineMark->id); return redirect()->route('admin.timeline.index'); }
/** * Update the specified resource in storage. * * @param TimelineMarkRequest $request * @param string $slug * @return \Illuminate\Http\Response */ public function update(TimelineMarkRequest $request, $slug) { $timelineMark = $this->timeline_marks->where('slug', $slug)->first(); $timelineMark->update($request->all()); flash()->success('Updated!', 'Timeline Mark has been updated'); return redirect()->route('admin.timeline.index'); }