src/Prettus/Repository/Generators/Migrations/RulesParser.php
public function parse($rules)
    {
        $this->rules = $rules;
        $parsed = [];
        foreach ($this->getRules() as $rulesArray) {
            $column = $this->getColumn($rulesArray);
            $attributes = $this->getAttributes($column, $rulesArray);
            $parsed[$column] = $attributes;
        }

        return $parsed;
    }
public function parse($rules)
    {
        $this->rules = $rules;
        $parsed = [];
        foreach ($this->getRules() as $rulesArray) {
            $column = $this->getColumn($rulesArray);
            $attributes = $this->getAttributes($column, $rulesArray);
            $parsed[$column] = $attributes;
        }

        return $parsed;
    }
public function parse ( $ rules ) { $ this -> rules = $ rules ; $ parsed = [ ] ; foreach ( $ this -> getRules ( ) as $ rulesArray ) { $ column = $ this -> getColumn ( $ rulesArray ) ; $ attributes = $ this -> getAttributes ( $ column , $ rulesArray ) ; $ parsed [ $ column ] = $ attributes ; } return $ parsed ; }
Parse a string to array of formatted rules.

@param  string $rules

@return array
Parse a string to array of formatted rules .