/**
  * Homepage
  *
  * @param $slug
  * @return mixed
  */
 public function serve($slug)
 {
     $post = $this->postService->findBySlug($slug);
     if ($post['type'] == 1) {
         return $this->servePage($post);
     }
     return $this->servePost($post);
 }
 /**
  * Delete a post
  *
  * @param $id
  * @return mixed
  */
 public function doDelete($id)
 {
     $this->post->delete($id);
     return redirect()->route('admin.posts.list');
 }
 /**
  * Homepage
  *
  * @param Request $request
  * @return mixed
  */
 public function home(Request $request)
 {
     $posts = $this->postService->search($request->all());
     return $this->view('home', compact('posts'));
 }