{"id":37262281,"url":"https://github.com/cwssrl/eloquent-lumen-generator","last_synced_at":"2026-01-15T23:19:59.799Z","repository":{"id":56960580,"uuid":"210810196","full_name":"cwssrl/eloquent-lumen-generator","owner":"cwssrl","description":"Provide a method to scaffold models and related objects in Lumen project","archived":false,"fork":false,"pushed_at":"2020-01-26T16:49:12.000Z","size":194,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-05T22:40:47.356Z","etag":null,"topics":["lumen","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cwssrl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-25T09:46:13.000Z","updated_at":"2025-01-07T08:26:27.000Z","dependencies_parsed_at":"2022-08-21T05:10:18.649Z","dependency_job_id":null,"html_url":"https://github.com/cwssrl/eloquent-lumen-generator","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/cwssrl/eloquent-lumen-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwssrl%2Feloquent-lumen-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwssrl%2Feloquent-lumen-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwssrl%2Feloquent-lumen-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwssrl%2Feloquent-lumen-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwssrl","download_url":"https://codeload.github.com/cwssrl/eloquent-lumen-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwssrl%2Feloquent-lumen-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lumen","php"],"created_at":"2026-01-15T23:19:59.086Z","updated_at":"2026-01-15T23:19:59.790Z","avatar_url":"https://github.com/cwssrl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eloquent Lumen Generator\n\nEloquent Lumen Generator is a tool based on [Code Generator](https://github.com/cwssrl/code-generator) for generating Eloquent models.\nIt comes with the possibility to generate the following items:\n- Model;\n- Repository and Contracts, binding them into the bootstrap/app.php file;\n- Api Controller;\n- Routes;\n- Resources;\n- Translation management for tables.\nIt manages MySql and PostgreSql as database. \n\n## Requirements\n\nTo make this package works you have to make your migrations and run them. All the package will create items based on \nthe table that it can find on the database set on your .env file.\n\n## Installation\nStep 1. Add Eloquent Lumen Generator to your project:\n```\ncomposer require cwssrl/eloquent-lumen-generator --dev\n```\nStep 2. Register `GeneratorServiceProvider` in bootstrap/app.php file:\n```php\n$app-\u003eregister(Cws\\EloquentModelGenerator\\Provider\\GeneratorServiceProvider::class);\n```\n\nStep 3. Uncomment AppServiceProvider in bootstrap/app.php file: \n\nStep 4 (optional). If you want to edit package configurations, you have to copy vendor/cwssrl/eloquent-lumen-generator/src/Resources/eloquent_model_generator.php into your config folder. \n\n## Usage\nUse\n```\nphp artisan cws:generate Book --all-api\n```\nto generate all you need for the Book class. Generator will look for table with name `books` and generate the model, the repo, the contract, the controller, the routes for it.\n\nYou can also generate data for all your tables at once\n```\nphp artisan cws:generate all --all-api\n```\n\n### Valid options\n\nYou can use these options as command parameters\n\nOption | Description\n--- | ---\ntable-name | Set the table name generator has to use generating your model (e.g. \"cws:generate Test --table-name=hello\" will use table named \"hello\" to generate model \"Test\"). It can be used only when one model a time is created.\noutput-path | Set the path name generator has to use saving your model relative to app folder (e.g. \"cws:generate Test --output-path=hello\" will save your model \"Test\" in app/hello folder).\nnamespace | Set the namespace name generator has to use generating your model (e.g. \"cws:generate Test --namespace=hello\" will use namespace \"hello\" to generate model \"Test\").\nbase-class-name | Set which class will extends your model (e.g. \"cws:generate Test --base-class-name=hello\" will extends \"hello\" class generating \"Test\").\nno-timestamps | Set timestamps property to false\ndate-format | dateFormat property\nconnection | connection property\nexcept-tables | Tables to not process separated by \",\"\napi-resource | Creates api resource too\nrepository | Creates repository too\napi-controller | Creates api controller too\napi-routes | Creates api routes too\napi-routes-path | Set the path where find api route file (default api.php)\nall-api | Create all objects related to api, models and repos included \n\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Testing\n\n``` bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Credits\n\n- [Samuele Salvatico](https://www.linkedin.com/in/samuele-salvatico-89527464/)\n- [Andrea Romanello](https://www.linkedin.com/in/andrea-romanello/)\n\nThis package is heavily based on [Cws Code Generator](https://github.com/cwssrl/code-generator) that is a fork of the [krlove/code-generator](https://github.com/krlove/code-generator) package\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwssrl%2Feloquent-lumen-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwssrl%2Feloquent-lumen-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwssrl%2Feloquent-lumen-generator/lists"}