src/Repositories/EloquentPage.php
public function getFirstByUri($uri)
    {
        if (!request('preview')) {
            $this->where(column('status'), '1');
        }

        return $this->findBy(column('uri'), $uri);
    }
public function getFirstByUri($uri)
    {
        if (!request('preview')) {
            $this->where(column('status'), '1');
        }

        return $this->findBy(column('uri'), $uri);
    }
public function getFirstByUri ( $ uri ) { if ( ! request ( 'preview' ) ) { $ this -> where ( column ( 'status' ) , '1' ) ; } return $ this -> findBy ( column ( 'uri' ) , $ uri ) ; }
Get a page by its uri.

@param string $uri

@return TypiCMS\Modules\Models\Page
Get a page by its uri .