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