public function findBySlug($slug)
    {
        return $this->plugger
            ->setModel($this)
            ->setAdapter(Post::class)
            ->plugIn(get_page_by_path($slug, OBJECT, $this->getSlug()))
            ->getConnected()
            ->first();
    }
public function findBySlug($slug)
    {
        return $this->plugger
            ->setModel($this)
            ->setAdapter(Post::class)
            ->plugIn(get_page_by_path($slug, OBJECT, $this->getSlug()))
            ->getConnected()
            ->first();
    }
public function findBySlug ( $ slug ) { return $ this -> plugger -> setModel ( $ this ) -> setAdapter ( Post :: class ) -> plugIn ( get_page_by_path ( $ slug , OBJECT , $ this -> getSlug ( ) ) ) -> getConnected ( ) -> first ( ) ; }
Find post by slug.

@param string $slug

@return \Assely\Adapter\Post
Find post by slug .