src/Builders/ControllerBuilder.php
private function buildParts($template)
    {
        $template = str_replace([
            '$NAMESPACE$',
            '$MODEL$',
            '$CREATEREQUESTNAME$',
            '$UPDATEREQUESTNAME$',
            '$CLASS$',
            '$COLLECTION$',
            '$RESOURCE$',
            '$INDEXGET$',
            '$RELATIONSHIPS$',
            '$RELATIONSHIP_COMPACT$',
            '$RELATIONSHIP_COMPACT_EDIT$',
            '$RELATIONSHIP_NAMESPACES$',
            '$FILETRAIT$',
            '$FILESAVING$',
            '$ENUM$',
        ], [
            $this->namespace,
            $this->modelName,
            $this->createRequestName,
            $this->updateRequestName,
            $this->className,
            strtolower($this->modelName),
            strtolower($this->modelName),
            $this->indexBuilder(),
            $this->relationshipsBuilder(),
            $this->compactBuilder(),
            $this->compactEditBuilder(),
            $this->relationshipsNamespaces(),
            $this->files > 0 ? 'use App\Http\Controllers\Traits\FileUploadTrait;' : '',
            $this->files > 0 ? '$request = $this->saveFiles($request);' : '',
            $this->enum > 0 ? $this->enum() : '',
        ], $template);

        return $template;
    }
private function buildParts($template)
    {
        $template = str_replace([
            '$NAMESPACE$',
            '$MODEL$',
            '$CREATEREQUESTNAME$',
            '$UPDATEREQUESTNAME$',
            '$CLASS$',
            '$COLLECTION$',
            '$RESOURCE$',
            '$INDEXGET$',
            '$RELATIONSHIPS$',
            '$RELATIONSHIP_COMPACT$',
            '$RELATIONSHIP_COMPACT_EDIT$',
            '$RELATIONSHIP_NAMESPACES$',
            '$FILETRAIT$',
            '$FILESAVING$',
            '$ENUM$',
        ], [
            $this->namespace,
            $this->modelName,
            $this->createRequestName,
            $this->updateRequestName,
            $this->className,
            strtolower($this->modelName),
            strtolower($this->modelName),
            $this->indexBuilder(),
            $this->relationshipsBuilder(),
            $this->compactBuilder(),
            $this->compactEditBuilder(),
            $this->relationshipsNamespaces(),
            $this->files > 0 ? 'use App\Http\Controllers\Traits\FileUploadTrait;' : '',
            $this->files > 0 ? '$request = $this->saveFiles($request);' : '',
            $this->enum > 0 ? $this->enum() : '',
        ], $template);

        return $template;
    }
private function buildParts ( $ template ) { $ template = str_replace ( [ '$NAMESPACE$' , '$MODEL$' , '$CREATEREQUESTNAME$' , '$UPDATEREQUESTNAME$' , '$CLASS$' , '$COLLECTION$' , '$RESOURCE$' , '$INDEXGET$' , '$RELATIONSHIPS$' , '$RELATIONSHIP_COMPACT$' , '$RELATIONSHIP_COMPACT_EDIT$' , '$RELATIONSHIP_NAMESPACES$' , '$FILETRAIT$' , '$FILESAVING$' , '$ENUM$' , ] , [ $ this -> namespace , $ this -> modelName , $ this -> createRequestName , $ this -> updateRequestName , $ this -> className , strtolower ( $ this -> modelName ) , strtolower ( $ this -> modelName ) , $ this -> indexBuilder ( ) , $ this -> relationshipsBuilder ( ) , $ this -> compactBuilder ( ) , $ this -> compactEditBuilder ( ) , $ this -> relationshipsNamespaces ( ) , $ this -> files > 0 ? 'use App\Http\Controllers\Traits\FileUploadTrait;' : '' , $ this -> files > 0 ? '$request = $this->saveFiles($request);' : '' , $ this -> enum > 0 ? $ this -> enum ( ) : '' , ] , $ template ) ; return $ template ; }
Build controller template parts

@param $template

@return mixed
Build controller template parts