/** * Remove the specified Post from storage. * * @param int $id * * @return Response */ public function destroy($id) { $post = $this->postRepository->find($id); if (empty($post)) { Flash::error('Post not found'); return redirect(route('posts.index')); } $this->postRepository->delete($id); Flash::success('Post deleted successfully.'); return redirect(route('posts.index')); }