public function getRedirectBySlug($slug)
    {
        $redirects = $this->repository->redirects;
        foreach ($redirects as $redirect) {
            if ($redirect->slug == $slug) {
                return $redirect;
            }
        }

        return null;
    }
public function getRedirectBySlug($slug)
    {
        $redirects = $this->repository->redirects;
        foreach ($redirects as $redirect) {
            if ($redirect->slug == $slug) {
                return $redirect;
            }
        }

        return null;
    }
public function getRedirectBySlug ( $ slug ) { $ redirects = $ this -> repository -> redirects ; foreach ( $ redirects as $ redirect ) { if ( $ redirect -> slug == $ slug ) { return $ redirect ; } } return null ; }
Get a redirect by it's slug

@param $slug
@return \stdClass|null
Get a redirect by it s slug