public function deleteRedirectBySlug($slug)
    {
        $redirects = $this->repository->redirects;
        foreach ($redirects as $key => $redirect) {
            if ($redirect->slug == $slug) {
                unset($redirects[$key]);
            }
        }
        $redirects = array_values($redirects);
        $this->repository->redirects = $redirects;
        $this->save();
    }
public function deleteRedirectBySlug($slug)
    {
        $redirects = $this->repository->redirects;
        foreach ($redirects as $key => $redirect) {
            if ($redirect->slug == $slug) {
                unset($redirects[$key]);
            }
        }
        $redirects = array_values($redirects);
        $this->repository->redirects = $redirects;
        $this->save();
    }
public function deleteRedirectBySlug ( $ slug ) { $ redirects = $ this -> repository -> redirects ; foreach ( $ redirects as $ key => $ redirect ) { if ( $ redirect -> slug == $ slug ) { unset ( $ redirects [ $ key ] ) ; } } $ redirects = array_values ( $ redirects ) ; $ this -> repository -> redirects = $ redirects ; $ this -> save ( ) ; }
Delete a redirect by it's slug
@param $slug
Delete a redirect by it s slug