public function getPost($id, Request $request) { $blog = Blog::findOrFail($id); return view('beranda.post')->withBlog($blog); }
public function getDeletePost($id) { $blog = Blog::findOrFail($id); $blog->destroy($id); return redirect()->route('blog')->with('info', 'data berhasil di ubah'); }
public function edit($id) { $post = Blog::findOrFail($id); return view('blog.edit', ['post' => $post]); }