src/Commands/CrudApiCommand.php
protected function processJSONValidations($file)
    {
        $json = File::get($file);
        $fields = json_decode($json);

        if (!property_exists($fields, 'validations')) {
            return '';
        }

        $validationsString = '';
        foreach ($fields->validations as $validation) {
            $validationsString .= $validation->field . '#' . $validation->rules . ';';
        }

        $validationsString = rtrim($validationsString, ';');

        return $validationsString;
    }
protected function processJSONValidations($file)
    {
        $json = File::get($file);
        $fields = json_decode($json);

        if (!property_exists($fields, 'validations')) {
            return '';
        }

        $validationsString = '';
        foreach ($fields->validations as $validation) {
            $validationsString .= $validation->field . '#' . $validation->rules . ';';
        }

        $validationsString = rtrim($validationsString, ';');

        return $validationsString;
    }
protected function processJSONValidations ( $ file ) { $ json = File :: get ( $ file ) ; $ fields = json_decode ( $ json ) ; if ( ! property_exists ( $ fields , 'validations' ) ) { return '' ; } $ validationsString = '' ; foreach ( $ fields -> validations as $ validation ) { $ validationsString .= $ validation -> field . '#' . $ validation -> rules . ';' ; } $ validationsString = rtrim ( $ validationsString , ';' ) ; return $ validationsString ; }
Process the JSON Validations.

@param  string $file

@return string
Process the JSON Validations .