InfyOm\Generator\Commands\BaseCommand::saveSchemaFile PHP Méthode

saveSchemaFile() private méthode

private saveSchemaFile ( )
    private function saveSchemaFile()
    {
        $fileFields = [];
        foreach ($this->commandData->inputFields as $field) {
            $fileFields[] = ['fieldInput' => $field['fieldInput'], 'htmlType' => $field['htmlType'], 'validations' => $field['validations'], 'searchable' => $field['searchable'], 'fillable' => $field['fillable'], 'primary' => $field['primary'], 'inForm' => $field['inForm'], 'inIndex' => $field['inIndex']];
        }
        $path = config('infyom.laravel_generator.path.schema_files', base_path('resources/model_schemas/'));
        $fileName = $this->commandData->modelName . '.json';
        if (file_exists($path . $fileName) && !$this->confirmOverwrite($fileName)) {
            return;
        }
        FileUtil::createFile($path, $fileName, json_encode($fileFields, JSON_PRETTY_PRINT));
        $this->commandData->commandComment("\nSchema File saved: ");
        $this->commandData->commandInfo($fileName);
    }