/** * Display the specified resource. * * @param int $id * @return Response */ public function show($title) { $post = Posts::where('title', $title)->first(); return view('blog-item', compact('post')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Posts::find($id)->delete(); flash()->success('Deleted', 'Post deleted'); return redirect('/admin/posts'); }