private function applyFilters()
    {
        $availableOptions = ['name', 'method', 'uri', 'action', 'middleware'];
        foreach ($this->options() as $key => $option) {
            if (in_array($key, $availableOptions) && null != $option) {
                foreach ($this->routes as $index => $route) {
                    if (!str_contains(strtolower($route[$key]), strtolower($option)))
                        unset($this->routes[$index]);
                }
            }
        }
    }
private function applyFilters()
    {
        $availableOptions = ['name', 'method', 'uri', 'action', 'middleware'];
        foreach ($this->options() as $key => $option) {
            if (in_array($key, $availableOptions) && null != $option) {
                foreach ($this->routes as $index => $route) {
                    if (!str_contains(strtolower($route[$key]), strtolower($option)))
                        unset($this->routes[$index]);
                }
            }
        }
    }
private function applyFilters ( ) { $ availableOptions = [ 'name' , 'method' , 'uri' , 'action' , 'middleware' ] ; foreach ( $ this -> options ( ) as $ key => $ option ) { if ( in_array ( $ key , $ availableOptions ) && null != $ option ) { foreach ( $ this -> routes as $ index => $ route ) { if ( ! str_contains ( strtolower ( $ route [ $ key ] ) , strtolower ( $ option ) ) ) unset ( $ this -> routes [ $ index ] ) ; } } } }
Apply filters on routes if user provide
Apply filters on routes if user provide