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

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

        $relationsString = '';
        foreach ($fields->relationships as $relation) {
            $relationsString .= $relation->name . '#' . $relation->type . '#' . $relation->class . ';';
        }

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

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

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

        $relationsString = '';
        foreach ($fields->relationships as $relation) {
            $relationsString .= $relation->name . '#' . $relation->type . '#' . $relation->class . ';';
        }

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

        return $relationsString;
    }
protected function processJSONRelationships ( $ file ) { $ json = File :: get ( $ file ) ; $ fields = json_decode ( $ json ) ; if ( ! property_exists ( $ fields , 'relationships' ) ) { return '' ; } $ relationsString = '' ; foreach ( $ fields -> relationships as $ relation ) { $ relationsString .= $ relation -> name . '#' . $ relation -> type . '#' . $ relation -> class . ';' ; } $ relationsString = rtrim ( $ relationsString , ';' ) ; return $ relationsString ; }
Process the JSON Relationships.

@param  string $file

@return string
Process the JSON Relationships .