public function resolve()
    {
       $url = $this->request->url();
       $tmp = explode('/', $url);
       $last_seg = end($tmp);

       return $this->repository->findBySlug($last_seg);
    }
public function resolve()
    {
       $url = $this->request->url();
       $tmp = explode('/', $url);
       $last_seg = end($tmp);

       return $this->repository->findBySlug($last_seg);
    }
public function resolve ( ) { $ url = $ this -> request -> url ( ) ; $ tmp = explode ( '/' , $ url ) ; $ last_seg = end ( $ tmp ) ; return $ this -> repository -> findBySlug ( $ last_seg ) ; }
Resolve the post.

@return PostInterface|null
Resolve the post .