classes/Models/RedirectRule.php
public function onValidating($validation)
    {
        // Clean up "from" route, stripping host and leading slash
        $this->from = preg_replace('#^([^/]*//[^/]+)?/?#', '', $this->from);

        // Make an absolute path if the current domain is entered
        $this->to = Utils\URL::urlToAbsolutePath($this->to);

        // Add row exception for unique
        if ($this->exists) {
            $rules = $validation->getRules();
            $rules['from'][1] .= ','.$this->getKey();
            $validation->setRules($rules);
        }
    }
public function onValidating($validation)
    {
        // Clean up "from" route, stripping host and leading slash
        $this->from = preg_replace('#^([^/]*//[^/]+)?/?#', '', $this->from);

        // Make an absolute path if the current domain is entered
        $this->to = Utils\URL::urlToAbsolutePath($this->to);

        // Add row exception for unique
        if ($this->exists) {
            $rules = $validation->getRules();
            $rules['from'][1] .= ','.$this->getKey();
            $validation->setRules($rules);
        }
    }
public function onValidating ( $ validation ) { // Clean up "from" route, stripping host and leading slash $ this -> from = preg_replace ( '#^([^/]*//[^/]+)?/?#' , '' , $ this -> from ) ; // Make an absolute path if the current domain is entered $ this -> to = Utils \ URL :: urlToAbsolutePath ( $ this -> to ) ; // Add row exception for unique if ( $ this -> exists ) { $ rules = $ validation -> getRules ( ) ; $ rules [ 'from' ] [ 1 ] .= ',' . $ this -> getKey ( ) ; $ validation -> setRules ( $ rules ) ; } }
Pre-validation rules

@param  Illuminate\Validation\Validator $validation
@return null
Pre - validation rules