{"id":18674271,"url":"https://github.com/simtabi/laravel-modulizer","last_synced_at":"2025-11-07T01:30:39.553Z","repository":{"id":57891752,"uuid":"528910680","full_name":"simtabi/laravel-modulizer","owner":"simtabi","description":"Generate Laravel Modules from a template.","archived":false,"fork":false,"pushed_at":"2022-08-26T15:09:22.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T20:14:05.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simtabi.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["simtabi"]}},"created_at":"2022-08-25T15:28:11.000Z","updated_at":"2022-08-25T15:28:54.000Z","dependencies_parsed_at":"2022-08-29T02:12:42.136Z","dependency_job_id":null,"html_url":"https://github.com/simtabi/laravel-modulizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simtabi%2Flaravel-modulizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simtabi%2Flaravel-modulizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simtabi%2Flaravel-modulizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simtabi%2Flaravel-modulizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simtabi","download_url":"https://codeload.github.com/simtabi/laravel-modulizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239515575,"owners_count":19651776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-07T09:18:14.459Z","updated_at":"2025-11-07T01:30:39.515Z","avatar_url":"https://github.com/simtabi.png","language":"PHP","funding_links":["https://github.com/sponsors/simtabi"],"categories":[],"sub_categories":[],"readme":"![banner](assets/banner.png?raw=true)\n\nThis package provides you with a simple way to generate a new Laravel module(package) template and, it will let you focus on the development of the package instead of the boilerplate with a\n[Laravel Modules](https://github.com/nWidart/laravel-modules) experience. \nIf you like a visual explanation [check out this video by Jeffrey Way on Laracasts](https://laracasts.com/series/building-laracasts/episodes/3). \n\n# Requirements\n\nLaravel 8 or 9 and PHP 8.0\n\n# Install\n\nYou can install the package via composer:\n\n```bash\ncomposer require simtabi/laravel-modulizer\n```\n\nPublish both the `config` and `stubs`:\n\n```bash\nphp artisan vendor:publish --provider=\"Simtabi\\Modulizer\\ModulizerServiceProvider\"\n```\n\nThis will publish a `modulizer.php` config file\n\nThis contains:\n```php\n    'ignore_files' =\u003e ['module.json'],\n    'modules_path' =\u003e env('MODULIZER_MODULES_PATH', 'platform/modules'),\n    'stubs_path'   =\u003e env('MODULIZER_STUBS_PATH', 'stubs/module'),\n```\nBy default, the stubs will be located at ``path-to-vendor-package-folder/stubs/modulizer`` you can add your own paths by adding your paths to your .env file or changing the config file.\n\n```bash \nMODULIZER_MODULES_PATH=your-custom-modules-destination-location\nMODULIZER_STUBS_PATH=your-custom-stubs-location\n```\n\n# Usage\n\nCreate or update the stubs file. The filename and contents should have placeholders for example `ModulesController` will be replaced with your name + Controller. ie `ContactsController` when the command is executed.\n\nPlaceholders:\n\nThese placeholders are replaced with the name provided when running `php artisan modulizer:module:generate`\n\n#### 1. Used in filenames:\n\n`Module` = Module name ie `Contacts`\n\n`module` = Module name in lowercase ie `contacts`\n\n`Model` = Model name ie `Contact`\n\n`model` = Model name in lowercase ie `contact`\n\n\u003e For a folder called `Models` rename it to `Entities` it will be renamed when back to Models when generating a new module.\n\n#### 2. Only used inside files:\n\n\n`{Module}` = Module name ie `PurchaseOrders`\n\n`{module}` = Module name in lowercase ie `purchaseOrder`\n\n`{module_}` = module name with underscores ie `purchase_orders`\n\n`{module-}` = module name with hyphens ie `purchase-orders`\n\n`{module }` = module name puts space between capital letters ie `PurchaseOrders` becomes `Purchase Orders`\n\n`{Model}` = Model name ie `PurchaseOrder`\n\n`{model}` = Model name in lowercase ie `purchaseOrder`\n\n`{model_}` = model name with underscores ie `purchase_orders`\n\n`{model-}` = model name with hyphens ie `purchase-orders`\n\n`{model }` = model name puts space between capital letters ie `PurchaseOrder` becomes `Purchase Order`\n\n\n## Available commands\n\n### Generate\n**Command:**\n```bash\n$ php artisan modulizer:module:generate my-vendor my-package\n```\n\n**Result:**\nThe command will handle practically everything for you. It will create a packages directory, creates the vendor and package directory in it, pulls in a skeleton package, sets up composer.json and creates a service provider.\n\n**Options:**\n```bash\n$ php artisan modulizer:module:generate my-vendor my-package --i\n$ php artisan modulizer:module:generate --i\n```\nThe package will be created interactively, allowing to configure everything in the package's `composer.json`, such as the license and package description.\n\n```bash\n$ php artisan modulizer:module:generate my-vendor/my-package\n```\nAlternatively you may also define your vendor and name with a forward slash instead of a space.\n\n### Tests\n**Command:**\n```bash\n$ php artisan modulizer:module:tests\n```\n\n**Result:**\nModulizer will go through all maintaining packages (in `platform/modules/`) and publish their tests to `tests/modules`.\nAdd the following to phpunit.xml (under the other testsuites) in order to run the tests from the packages:\n```xml\n\u003ctestsuite name=\"Packages\"\u003e\n    \u003cdirectory suffix=\"Test.php\"\u003e./tests/modules\u003c/directory\u003e\n\u003c/testsuite\u003e\n```\n\n**Options:**\n```bash\n$ php artisan modulizer:module:tests my-vendor my-package\n```\n\n**Remarks:**\nIf a tests folder exists, the files will be copied to a dedicated folder in the Laravel App tests folder. This allows you to use all of Laravel's own testing functions without any hassle.\n\n### List\n**Command:**\n```bash\n$ php artisan modulizer:module:list\n```\n\n**Result:**\nAn overview of all packages in the `/modules` directory.\n\n**Options:**\n```bash\n$ php artisan modulizer:module:list --git\n```\nThe packages are displayed with information on the git status (branch, commit difference with origin) if it is a git repository.\n\n### Remove\n**Command:**\n```bash\n$ php artisan modulizer:module:remove my-vendor my-package\n```\n\n**Result:**\nThe `my-vendor\\my-package` package is deleted, including its references in `composer.json` and `config/app.php`.\n\n### Publish\n**Command:**\n```bash\n$ php artisan modulizer:module:publish my-vendor my-package https://github.com/my-vendor/my-package\n```\n\n**Result:**\nThe `my-vendor\\my-package` package will be published to Github using the provided url.\n\n### Check\n**Command:**\n```bash\n$ php artisan modulizer:module:check my-vendor my-package\n```\n\n**Result:**\nThe `my-vendor\\my-package` package will be checked for security vulnerabilities using SensioLabs security checker.\n\n**Remarks**\nYou first need to run\n\n```bash\n$ composer require sensiolabs/security-checker\n```\n\n## Change log\n\nPlease see the [changelog][3] for more information on what has changed recently.\n\n## Contributing\n\nContributions are welcome and will be fully credited.\n\nContributions are accepted via Pull Requests on [Github][4].\n\n## Pull Requests\n\n- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.\n\n- **Consider our release cycle** - We try to follow [SemVer v2.0.0][5]. Randomly breaking public APIs is not an option.\n\n- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.\n\n## Security\n\nIf you discover any security related issues, please email imani@simtabi.com email instead of using the issue tracker.\n\n\n## Credits \u0026 Inspiration\n\n- [Simtabi][link-author]\n- [nWidart](https://github.com/nWidart/laravel-modules)\n- [dcblogdev](https://github.com/dcblogdev/laravel-modulizer)\n- [Jeroen-G](https://github.com/Jeroen-G/laravel-packager)\n- [All Contributors][link-contributors]\n\n## License\n\nPlease see the [license file][6] for more information.\n\n[link-author]: https://github.com/simtabi\n[link-contributors]: contributors\n\n[3]:    changelog.md\n[4]:    https://github.com/simtabi/laravel-modulizer\n[5]:    http://semver.org/\n[6]:    license.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimtabi%2Flaravel-modulizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimtabi%2Flaravel-modulizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimtabi%2Flaravel-modulizer/lists"}