/** * Show the form for editing the specified resource. * * @param int $id * * @return Response */ public function edit($id) { $post = $this->post->find($id); $news = null; if (request()->has('url')) { $news = $this->rss->fetchData(request('url')); } if (is_null($post)) { return redirect()->route('post.index')->with('error', 'Post not found.'); } return view('post.edit', compact('post', 'news')); }