Project

Project

new Project()

Properties:
Name Type Description
laravelVersion number The Laravel Version
name string The project name
url string The project URL
cascadeDeleteAsDefault boolean Set the cascadeDelete as default
cascadeUpdateAsDefault boolean Set the cascadeUpdate as default
folder string | null The project folder
repositoryUrl string | null The Laravel repository URL
repositoryBranch string | null The Laravel repository branch
settings SettingsBaseData Project settings
cruds Array.<Crud> Returns all project cruds
authModel Entity The project authentication model
entities Array.<Entity> Returns all project entities
models Array.<Entity> Returns all project models

Methods

deleteFile(folderPath) → {boolean}

Delete a project file
Parameters:
Name Type Description
folderPath string
Returns:
Type
boolean

deleteFolder(folderPath, log) → {boolean}

Delete a project folder
Parameters:
Name Type Default Description
folderPath string
log boolean true Generate a log
Returns:
Type
boolean

findEntityByName() → {Entity|undefined}

Returns the entity based on name
Returns:
Type
Entity | undefined

findEntityByTableName() → {Entity|undefined}

Returns the entity based on table name
Returns:
Type
Entity | undefined

getDefaultRepositoryBranch() → {string}

Returns the Laravel version default branch
Returns:
Type
string

getDefaultRepositoryUrl() → {string}

Returns the Laravel repository default URL
Returns:
Type
string

getFullFilePath(filePath) → {boolean}

Returns the absolute file path
Parameters:
Name Type Description
filePath string the file path relative to the project
Returns:
Type
boolean

getHasManyDetailCruds() → {Array.<Crud>}

Returns all cruds that area a detail from a hasMany relationship
Returns:
Type
Array.<Crud>

getMainCruds() → {Array.<Crud>}

Returns all project cruds that are not a detail
Returns:
Type
Array.<Crud>

getRepositoryBranch() → {string}

Returns the Laravel version branch
Returns:
Type
string

getRepositoryUrl() → {string}

Returns the Laravel repository URL
Returns:
Type
string

getUiTemplateDescription() → {string}

Returns a ui template description
Returns:
Type
string

getValidCruds() → {Array.<Crud>}

Returns the valid project cruds
Returns:
Type
Array.<Crud>

hasEntityByName() → {boolean}

Returns if the project has entity with the same name of the passed on argument
Returns:
Type
boolean

hasFile(filePath) → {boolean}

Checks if the project has a file
Parameters:
Name Type Description
filePath string
Returns:
Type
boolean

hasFolder(folderPath) → {boolean}

Checks if the project has a folder
Parameters:
Name Type Description
folderPath string
Returns:
Type
boolean

needsBootstrapPaginator() → {boolean}

Returns if it needs the bootstrap paginator on project
Returns:
Type
boolean

rootFolderExistsAndIsNotEmpty() → {boolean}

Returns if this project was generated
Returns:
Type
boolean

usesBootstrap() → {boolean}

Check if this project uses Bootstrap as a css framework
Returns:
Type
boolean

usesBreezeTemplate() → {boolean}

Check if this project uses Breeze as a template
Returns:
Type
boolean

usesJetstreamTemplate() → {boolean}

Check if this project uses Jetstream as a template
Returns:
Type
boolean

usesLaravelUiTemplate() → {boolean}

Check if this project uses Laravel UI as a template
Returns:
Type
boolean

usesSanctumAuth() → {boolean}

Check if this project uses Sanctum Auth
Returns:
Type
boolean

usesTailwind() → {boolean}

Check if this project uses Tailwind as a css framework
Returns:
Type
boolean

viewsPath() → {string}

Returns the views default path
Returns:
Type
string

wasNotGeneratedYet() → {boolean}

Return if this project has not yet generated code
Returns:
Type
boolean