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