public function sanitize()
    {
        $sanitized = $this->data;

        foreach ($this->rules as $attr => $rules) {
            if (Arr::has($this->data, $attr)) {
                $value = Arr::get($this->data, $attr);

                foreach ($rules as $rule) {
                    $value = $this->applyFilter($rule['name'], $value, $rule['options']);
                }

                Arr::set($sanitized, $attr, $value);
            }
        }

        return $sanitized;
    }
public function sanitize()
    {
        $sanitized = $this->data;

        foreach ($this->rules as $attr => $rules) {
            if (Arr::has($this->data, $attr)) {
                $value = Arr::get($this->data, $attr);

                foreach ($rules as $rule) {
                    $value = $this->applyFilter($rule['name'], $value, $rule['options']);
                }

                Arr::set($sanitized, $attr, $value);
            }
        }

        return $sanitized;
    }
public function sanitize ( ) { $ sanitized = $ this -> data ; foreach ( $ this -> rules as $ attr => $ rules ) { if ( Arr :: has ( $ this -> data , $ attr ) ) { $ value = Arr :: get ( $ this -> data , $ attr ) ; foreach ( $ rules as $ rule ) { $ value = $ this -> applyFilter ( $ rule [ 'name' ] , $ value , $ rule [ 'options' ] ) ; } Arr :: set ( $ sanitized , $ attr , $ value ) ; } } return $ sanitized ; }
Sanitize the given data
@return array
Sanitize the given data