public function append($id) { $topic = Topic::findOrFail($id); $this->authorOrAdminPermissioinRequire($topic->user_id); $markdown = new Markdown(); $content = $markdown->convertMarkdownToHtml(Input::get('content')); $append = Append::create(['topic_id' => $topic->id, 'content' => $content]); app('App\\good\\Notification\\Notifier')->newAppendNotify(Auth::user(), $topic, $append); flash()->success('Good Jobs!', lang('Operation succeeded.')); return Redirect::route('topics.show', $topic->id); }
public function append(Request $request, $id) { $topic = Topic::findOrFail($id); $this->authorOrAdminPermissioinRequire($topic->user_id); $markdown = app('markdown'); $content = $markdown->convertMarkdownToHtml($request->input('content')); $append = Append::create(['topic_id' => $topic->id, 'content' => $content]); //TODO //App::make('Phphub\Notification\Notifier')->newAppendNotify(Auth::user(), $topic, $append); Flash::success(lang('Operation succeeded.')); return redirect()->route('topics.show', $topic->id); }