Skip to content

Configuration

You can configure paths, namespaces, options, add*_*ons from published config file (config\infyom\laravel_generator.php).

Paths

migration - path where migration file should be generated

model - path where model file should be generated

datatables - path where DataTable files should be generated

repository - path where repository file should be generated

routes - path of routes file where routes should be added

api_routes - path of api_routes.php (this file will contain all API routes)

request - path where request file should be generated

api_request - path where API request file should be generated

controller - path where scaffold controller file should be generated

api_controller - path where API controller file should be generated

tests - path to tests directory

repository_test - path where repository test file should be generated

api_test - path where test files should be generated

views - path where views file should be generated

schema_files - path where all schema files should be stored

templates_dir - path where all templates should be published

seeder - path where all seeders are stored

database_seeder - path to main DatabaseSeeder file

factory - path where all factories are stored

view_provider - path to ViewServiceProvider file

Namespaces

model - Namespace of Model

datatables - Namespace of DataTable files

repository - Namespace of Repository

controller - Namespace of scaffold Controller

api_controller - Namespace of API Controller

request - Namespace of scaffold Request

api_request - Namespace of API Request

tests - Namespace of Tests

repository_test - Namespace of Repository Tests

api_test - Namespace of API Tests

Scaffold Templates

templates - Templates types (coreui-templates, adminlte-templates)

You can build your own templates package as well and can give a full path here. for e.g. base_path('vendor/mitul/mitul-templates').

For any of InfyOmLabs templates, you can simple give a name only.

Model extend class

model_extend_class - Model Extends Class

API routes prefix and version

api_prefix - API prefix

api_version - API version

Options

softDelete - use soft delete with models

save_schema_file - By default save model schema file or not

localized - Create localization CRUD

tables_searchable_default - By default make all fields searchable in Datatable except primary key and timestamps

repository_pattern - Use repository pattern with controllers or not

excluded_fields - Array of fields that will be skipped while creating module

Prefixes

route - route prefix

path - path prefix

view - view prefix

public - public folder prefix

Add-Ons

swagger - generate swagger annotations for APIs

tests - generate test cases for APIs

datatables - generate CRUD index file with datatables

menu - If you are using generator's default layout then make it true to generate sidebar menu for module

Timestamps

enabled - enable timestamps

created_at - Created At timestamp field name

updated_at - Updated At timestamp field name

deleted_at - Deleted At timestamp field name

From Table

doctrine_mappings - Custom doctrine mappings to skip mapping errors while generating from table. e.g.['enum' => 'string', 'json' => 'text']